Skip to content

Fix task queue stats versioning test flake#10773

Open
stephanos wants to merge 27 commits into
stephanos/migrate-worker_deployment_testfrom
stephanos/flaky-taskqueustats
Open

Fix task queue stats versioning test flake#10773
stephanos wants to merge 27 commits into
stephanos/migrate-worker_deployment_testfrom
stephanos/flaky-taskqueustats

Conversation

@stephanos

@stephanos stephanos commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What changed?

Fixes flaky TestTaskQueueStats_Pri_Suite/TestVersioningSuite/NoTaskForwardNoPollForwardAllowSyncSuite/TestRampingAndCurrentAbsorbUnversionedBacklog (example)

@stephanos stephanos force-pushed the stephanos/flaky-taskqueustats branch 5 times, most recently from ed4f7aa to f4a5de8 Compare June 18, 2026 22:38
// to account for ceiling operations across partitions
expectation.MaxExtraTasks = env.partitionCount
validateTaskQueueStats(s.T(), label, stats, expectation)
validateTaskQueueStats(s.Assertions, label, stats, expectation)

@stephanos stephanos Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing s.Assertions keeps this check bound to the s.Await attempt

})
s.NoError(err)
s.NotNil(resp)
s.NotNil(env.findVersionTaskQueue(resp.GetVersionTaskQueues(), tqName, enumspb.TASK_QUEUE_TYPE_WORKFLOW))

@stephanos stephanos Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to help make the test less flaky

stephanos and others added 4 commits June 18, 2026 16:01
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>
@@ -1584,23 +1623,23 @@ func validateTaskQueueStatsStrict(
}

func validateTaskQueueStats(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't make this a method without duplicating it as it's used from both suites.

@stephanos stephanos changed the base branch from main to stephanos/migrate-worker_deployment_test June 18, 2026 23:44
@stephanos stephanos added the test-all-dbs Request PR checks to test all databases label Jun 18, 2026
@stephanos stephanos force-pushed the stephanos/flaky-taskqueustats branch from f4a5de8 to 91e11cc Compare June 18, 2026 23:46
}
}

func (env *VersioningTestEnv) waitForTaskQueueVersioningInfo(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helper is shared between both suites

"go.temporal.io/server/tests/testcore"
)

type VersioningTestEnv struct {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New env for versioning that can provide helpers across suites; like NexusTestEnv

if tq.GetName() == tqName && tq.GetType() == tqType {
return tq.GetStats(), true, nil
}
if tq := s.findVersionTaskQueue(resp.GetVersionTaskQueues(), tqName, tqType); tq != nil {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this into a helper

@stephanos stephanos marked this pull request as ready for review June 19, 2026 00:17
@stephanos stephanos requested review from a team as code owners June 19, 2026 00:17
@stephanos stephanos force-pushed the stephanos/flaky-taskqueustats branch from 5053e9e to ed6ad04 Compare June 19, 2026 00:43
@stephanos stephanos force-pushed the stephanos/flaky-taskqueustats branch from ed6ad04 to 5cdefd8 Compare June 19, 2026 00:45

@Shivs11 Shivs11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tysm for your work on this

@stephanos stephanos force-pushed the stephanos/flaky-taskqueustats branch from 5cdefd8 to bf8f022 Compare June 19, 2026 16:11
@stephanos stephanos force-pushed the stephanos/migrate-worker_deployment_test branch from 5674ea5 to dd04d8c Compare June 19, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-all-dbs Request PR checks to test all databases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants