Skip to content

migrate Versioning3Suite#10144

Open
stephanos wants to merge 2 commits into
mainfrom
stephanos/parallel-versioning
Open

migrate Versioning3Suite#10144
stephanos wants to merge 2 commits into
mainfrom
stephanos/parallel-versioning

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented May 1, 2026

What changed?

Migrate Versioning3Suite to use parallelsuite.

Added two legacy modes for compatibility as the suite showed issues otherwise:

(1) parallelsuite legacy mode: run sequentially
(2) testenv legacy mode: use single cluster only

Why?

Make cosmetic changes, ship them, adjust runtime behavior later.

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 4 times, most recently from be92a54 to 7bb6593 Compare May 1, 2026 14:52
farm.Fingerprint32([]byte(fullName)),
)
return strings.Replace(short, ".", "|", -1)
}
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.

was unused

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 3 times, most recently from 872c197 to 2ef1d4b Compare May 1, 2026 15:05
@stephanos stephanos added the test-all-dbs Request PR checks to test all databases label May 1, 2026
@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 14 times, most recently from 0fb6440 to 7da0418 Compare May 1, 2026 20:30
}

func (s *Versioning3Suite) TestSessionActivityResourceSpecificTaskQueueNotRegisteredInVersion() {
tv := testvars.New(s)

ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos May 1, 2026

Choose a reason for hiding this comment

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

one big change here is removing these contexts; they are all placed with simply env.Context() which has a default timeout. so they are not really needed (and can sometimes be too aggressiv for CI).

@@ -72,124 +70,133 @@ const (
versionStatusRamping = versionStatus(3)
versionStatusDraining = versionStatus(4)
versionStatusDrained = versionStatus(5)

versioning3DeploymentWorkflowVersion = workerdeployment.VersionDataRevisionNumber
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.

parallelsuite doesn't allow fields so this was moved here - it seems to be readonly anyway

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch from 7da0418 to 4dc3841 Compare May 1, 2026 21:58
@@ -1411,7 +1393,7 @@ func (s *Versioning3Suite) testDoubleTransition(unversionedSrc bool, signal bool
// 8. Not that the transition is complete, the activity should be able to go to sourceV poller.
// 9. Set v2 as current again and ensure the wf can complete on it.

tv1 := testvars.New(s).WithBuildIDNumber(1)
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.

testvars are coming from env now

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 2 times, most recently from 1a58c19 to 4ac032b Compare May 1, 2026 22:02
// unique namespaces with overrides per namespace should be used for tests that require overrides.
defaultDynamicConfigOverrides = map[dynamicconfig.Key]any{
dynamicconfig.FrontendRPS.Key(): 3000,
dynamicconfig.FrontendNamespaceReplicationInducingAPIsRPS.Key(): 1000,
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 here since it's a global config

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 3 times, most recently from 11ae0d3 to 22b4ddb Compare May 1, 2026 22:24
}

func (s *Versioning3Suite) updateUtils() updateutils.UpdateUtils {
return updateutils.New(s.T())
}

func (s *Versioning3Suite) TestPinnedTask_NoProperPoller() {
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.

"Hide Whitespace is required from here on

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 3 times, most recently from dc71a2b to df0bd86 Compare May 1, 2026 22:42
@stephanos stephanos force-pushed the stephanos/parallel-versioning branch 11 times, most recently from 4aebf53 to 32aeb60 Compare May 13, 2026 22:18

// create version v1 and make it current
idlePollerDone := make(chan struct{})
go func() {
s.idlePollWorkflow(context.Background(), tv, true, ver3MinPollTime, "should not have gotten any tasks since there are none")
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.

context.Background() should not be used in tests as it is completely unbound

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch from 32aeb60 to d16d247 Compare May 13, 2026 23:47
Comment on lines -3719 to 3720
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
ctx, cancel := context.WithTimeout(env.Context(), time.Second*5)
defer cancel()
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.

leaving these, though, as they seem to intentionally limit the execution time of these helpers

@stephanos stephanos force-pushed the stephanos/parallel-versioning branch from d16d247 to 4074e23 Compare May 14, 2026 00:04
@stephanos stephanos marked this pull request as ready for review May 14, 2026 00:24
@stephanos stephanos requested review from a team as code owners May 14, 2026 00:24
@stephanos stephanos requested review from Shivs11 and spkane31 May 14, 2026 00:24
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.

1 participant