Repository navigation
fix(tempo): send "to" with "from" when collecting worklogs - #9200
Merged
Merged
Conversation
Since apache#9164 a full sync asks Tempo for worklogs from timeAfter with no end date. Tempo rejects that period on every page: {"errors":[{"message":"Non valid period, from '2026-01-28' to 'null'"}]} (400) so full syncs (and the first run of each team after upgrading to beta18, whose collector state starts fresh) fail in collect_worklogs. Whenever the query has "from" and no "to", set "to" to the date the collection started (one value for every page). Incremental runs keep using updatedFrom, which Tempo accepts on its own.
klesh
approved these changes
Oct 8, 2026
klesh
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Thanks for your contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #9164 (released in v1.0.3-beta18): full syncs of the Tempo plugin fail in
collect_worklogs.For a full sync,
buildWorklogQuerysetsfrom=<timeAfter>and noto. Tempo rejects that period on every page, starting at offset 0:This hits every full sync, and also the first run of every team after upgrading to beta18, since #9164 scopes the collector state per team so each team starts fresh. Before #9164 the team endpoint always sent both
fromandto(todefaulting to today); the OpenAPI spec lists both as optional, but the API requirestowhenfromis set.Fix: whenever the query has
fromand noto, settoto the date the collection started, computed once so every page asks for the same period. This covers the full sync and a lonefromDateoption. Incremental runs keep usingupdatedFromon its own, which Tempo accepts on both endpoints.Tests
TestBuildWorklogQuery: the full-sync and global-endpoint cases now expectto(the previous test asserted it was empty, which encoded the bug); new case for afromDateoption alone.gofmt/go vetclean;golangci-lintreports nothing new in the plugin.Does this close any open issues?
Follow-up to #9164 / #9163.
Screenshots
N/A