Fix task queue stats versioning test flake#10773
Open
stephanos wants to merge 27 commits into
Open
Conversation
ed4f7aa to
f4a5de8
Compare
stephanos
commented
Jun 18, 2026
| // to account for ceiling operations across partitions | ||
| expectation.MaxExtraTasks = env.partitionCount | ||
| validateTaskQueueStats(s.T(), label, stats, expectation) | ||
| validateTaskQueueStats(s.Assertions, label, stats, expectation) |
Contributor
Author
There was a problem hiding this comment.
Passing s.Assertions keeps this check bound to the s.Await attempt
stephanos
commented
Jun 18, 2026
| }) | ||
| s.NoError(err) | ||
| s.NotNil(resp) | ||
| s.NotNil(env.findVersionTaskQueue(resp.GetVersionTaskQueues(), tqName, enumspb.TASK_QUEUE_TYPE_WORKFLOW)) |
Contributor
Author
There was a problem hiding this comment.
This seems to help make the test less flaky
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Let CI verify physical task queue IDs stay within DB column limits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stephanos
commented
Jun 18, 2026
| @@ -1584,23 +1623,23 @@ func validateTaskQueueStatsStrict( | |||
| } | |||
|
|
|||
| func validateTaskQueueStats( | |||
Contributor
Author
There was a problem hiding this comment.
We can't make this a method without duplicating it as it's used from both suites.
f4a5de8 to
91e11cc
Compare
stephanos
commented
Jun 18, 2026
| } | ||
| } | ||
|
|
||
| func (env *VersioningTestEnv) waitForTaskQueueVersioningInfo( |
Contributor
Author
There was a problem hiding this comment.
This helper is shared between both suites
stephanos
commented
Jun 18, 2026
| "go.temporal.io/server/tests/testcore" | ||
| ) | ||
|
|
||
| type VersioningTestEnv struct { |
Contributor
Author
There was a problem hiding this comment.
New env for versioning that can provide helpers across suites; like NexusTestEnv
stephanos
commented
Jun 18, 2026
| if tq.GetName() == tqName && tq.GetType() == tqType { | ||
| return tq.GetStats(), true, nil | ||
| } | ||
| if tq := s.findVersionTaskQueue(resp.GetVersionTaskQueues(), tqName, tqType); tq != nil { |
Contributor
Author
There was a problem hiding this comment.
moved this into a helper
5053e9e to
ed6ad04
Compare
ed6ad04 to
5cdefd8
Compare
5cdefd8 to
bf8f022
Compare
5674ea5 to
dd04d8c
Compare
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.
What changed?
Fixes flaky
TestTaskQueueStats_Pri_Suite/TestVersioningSuite/NoTaskForwardNoPollForwardAllowSyncSuite/TestRampingAndCurrentAbsorbUnversionedBacklog(example)