Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test concurrent setCurrent/setRamping requests #7512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shivs11
Copy link
Member

@Shivs11 Shivs11 commented Mar 21, 2025

What changed?

Why?

  • verifying if the versioning feature can handle concurrent requests
  • desired behavior: back-to-back setCurrent/ramping requests with different inputs should not throw weird errors, only throttling or timeout, or successful result.

How did you test it?

  • Ran this suite locally and CI

Potential risks

Documentation

Is hotfix candidate?

  • No

@Shivs11 Shivs11 requested a review from a team as a code owner March 21, 2025 18:46
@@ -967,6 +936,37 @@ func (s *WorkerDeploymentSuite) TestSetWorkerDeploymentRampingVersion_NoCurrent_
})
}

func (s *WorkerDeploymentSuite) TestSetCurrent_NoDeploymentVersion() {
Copy link
Member Author

Choose a reason for hiding this comment

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

just moved this test to an area which had all other setCurrent tests - no need to review this.

@carlydf carlydf changed the title concurrent setCurrent/setRamping requests test concurrent setCurrent/setRamping requests Mar 24, 2025
Copy link
Contributor

@carlydf carlydf left a comment

Choose a reason for hiding this comment

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

Have you had a chance to test these new tests for flakiness? (ie. by running it through the CI action that runs it 50x in cassandra or something)

Copy link
Contributor

@carlydf carlydf left a comment

Choose a reason for hiding this comment

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

Based on my understanding of the ticket, I think that these tests should not override the MaxInFlightUpdates -- we should test against the default because that's what customers will have. Ideally that will only cause throttling or timeout errors and nothing "weird." If any other error type comes up, that's a bug that should be addressed.


for i := 0; i < versions; i++ {
err := <-errChan
s.NoError(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think some of these requests might be expected to get throttling error or context timeout error. If you decrease the # of WorkflowExecutionMaxInFlightUpdates to the default (which is 10), do you see anything weird, or just throttling + timeout errors?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think instead of s.NoError you could keep the rest of this test the same, and just assert that the error is either:

  • nil
  • timeout
  • throttling

Copy link
Contributor

Choose a reason for hiding this comment

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

just bringing this up since the ticket said "confirm that concurrent updates with different inputs don't result in any weird errors, only throttling or timeout or success"

@@ -1021,6 +1021,170 @@ func (s *WorkerDeploymentSuite) TestSetCurrentVersion_Unversioned_PromoteUnversi
s.verifyTaskQueueVersioningInfo(ctx, currentVars.TaskQueue(), worker_versioning.UnversionedVersionId, "", 0)
}

func (s *WorkerDeploymentSuite) TestSetCurrentVersion_Concurrent_DifferentVersions() {
s.OverrideDynamicConfig(dynamicconfig.WorkflowExecutionMaxInFlightUpdates, 100)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this test should use the default value for this (which is 10). What do you think?

}

func (s *WorkerDeploymentSuite) TestSetCurrentVersion_Concurrent_SameVersion() {
s.OverrideDynamicConfig(dynamicconfig.WorkflowExecutionMaxInFlightUpdates, 100)
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, we should be testing this with default config


for i := 0; i < 10; i++ {
err := <-errChan
s.NoError(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, throttling or timeout is acceptable

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants