Skip to content

Commit 50698f6

Browse files
authored
versioning flakes pt2 (temporalio#7473)
## What changed? <!-- Describe what has changed in this PR --> fixed some code to reduce versioning flakes, mainly: [TestVersioning3FunctionalSuite/TestUnpinnedWorkflowWithRamp_ToUnversioned](https://github.com/temporalio/temporal/actions/runs/13818885947/job/38659266639) (with_logger data-race ✅) [TestWorkerDeploymentSuite/TestSetWorkerDeploymentRampingVersion_Unversioned_VersionedCurrent](https://github.com/temporalio/temporal/actions/runs/13818885947/job/38659261367) ( context timeout - maybe fixed by having a separate go-routine ✅ ) [TestDeploymentVersionSuite/TestDrainageStatus_SetCurrentVersion_YesOpenWFs](https://github.com/temporalio/temporal/actions/runs/13818885947/job/38659258964) (with_logger data-race ✅) [TestVersioningFunctionalSuite/TestDispatchActivityFailCrossTq (retry 2)](https://github.com/temporalio/temporal/actions/runs/13712084173/job/38350437309) (with_logger data-race ✅) ## Why? <!-- Tell your future self why have you made these changes --> - To stop these from appearing as flakes in the test reports. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Ran this locally with `-race` and now see no errors (errored out previously) - Ran this on CI a bunch of times without errors/flakes ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
1 parent d2aab9d commit 50698f6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

common/log/with_logger.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ func newWithLogger(logger Logger, tags ...tag.Tag) *withLogger {
4949
}
5050

5151
func (l *withLogger) prependTags(tags []tag.Tag) []tag.Tag {
52-
return append(l.tags, tags...)
52+
allTags := make([]tag.Tag, len(l.tags)+len(tags))
53+
copy(allTags, l.tags)
54+
copy(allTags[len(l.tags):], tags)
55+
56+
return allTags
5357
}
5458

5559
// Debug writes message to the log (if enabled).

tests/worker_deployment_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,8 @@ func (s *WorkerDeploymentSuite) TestSetWorkerDeploymentRampingVersion_Unversione
10371037
defer cancel()
10381038
tv := testvars.New(s)
10391039
currentVars := tv.WithBuildIDNumber(1)
1040-
s.pollFromDeployment(ctx, currentVars)
1040+
1041+
go s.pollFromDeployment(ctx, currentVars)
10411042
s.ensureCreateVersionInDeployment(currentVars)
10421043

10431044
// check that the current version's task queues have ramping version == ""

0 commit comments

Comments
 (0)