-
Notifications
You must be signed in to change notification settings - Fork 266
Stop sending deployment info for session per-worker task queue #2088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
95e17e0
8e80d65
2580e74
5d9c0b3
f057f32
5fc9d01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ import ( | |
| enumspb "go.temporal.io/api/enums/v1" | ||
| "go.temporal.io/api/workflowservice/v1" | ||
|
|
||
| "go.temporal.io/sdk/activity" | ||
| "go.temporal.io/sdk/client" | ||
| "go.temporal.io/sdk/worker" | ||
| "go.temporal.io/sdk/workflow" | ||
|
|
@@ -236,6 +237,60 @@ func (ts *WorkerDeploymentTestSuite) TestBuildIDChangesOverWorkflowLifetime() { | |
| ts.Equal("2.0", lastBuildID) | ||
| } | ||
|
|
||
| func (ts *WorkerDeploymentTestSuite) TestBuildIDWithSession() { | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to gate this? All other tests here have this req |
||
| ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) | ||
| defer cancel() | ||
|
|
||
| deploymentName := "deploy-test-" + uuid.NewString() | ||
| v1 := worker.WorkerDeploymentVersion{ | ||
| DeploymentName: deploymentName, | ||
| BuildID: "1.0", | ||
| } | ||
|
|
||
| worker := worker.New(ts.client, ts.taskQueueName, worker.Options{ | ||
| EnableSessionWorker: true, | ||
| DeploymentOptions: worker.DeploymentOptions{ | ||
| UseVersioning: true, | ||
| Version: v1, | ||
| }, | ||
| }) | ||
|
|
||
| worker.RegisterWorkflowWithOptions(ts.workflows.BasicSession, workflow.RegisterOptions{ | ||
| Name: "SessionBuildIDWorkflow", | ||
| VersioningBehavior: workflow.VersioningBehaviorAutoUpgrade, | ||
| }) | ||
|
|
||
| activities2 := &Activities2{} | ||
| result := &Activities{activities2: activities2} | ||
| activities2.impl = result | ||
| worker.RegisterActivityWithOptions(activities2, activity.RegisterOptions{Name: "Prefix_", DisableAlreadyRegisteredCheck: true}) | ||
|
|
||
| ts.NoError(worker.Start()) | ||
| defer worker.Stop() | ||
|
|
||
| dHandle := ts.client.WorkerDeploymentClient().GetHandle(deploymentName) | ||
|
|
||
| ts.waitForWorkerDeployment(ctx, dHandle) | ||
|
|
||
| response1, err := dHandle.Describe(ctx, client.WorkerDeploymentDescribeOptions{}) | ||
| ts.NoError(err) | ||
|
|
||
| ts.waitForWorkerDeploymentVersion(ctx, dHandle, v1) | ||
|
|
||
| _, err = dHandle.SetCurrentVersion(ctx, client.WorkerDeploymentSetCurrentVersionOptions{ | ||
| BuildID: v1.BuildID, | ||
| ConflictToken: response1.ConflictToken, | ||
| }) | ||
| ts.NoError(err) | ||
|
|
||
| // start workflow1 with 1.0, BasicSession, auto-upgrade | ||
| wfHandle, err := ts.client.ExecuteWorkflow(ctx, ts.startWorkflowOptions("evolving-wf-1"), "SessionBuildIDWorkflow") | ||
| ts.NoError(err) | ||
|
|
||
| ts.NoError(wfHandle.Get(ctx, nil)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this actually verifying? This seems to pass on
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be asserting that buildId and versioning settings for the session activity worker is properly set? |
||
| } | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Test Missing Version Check for Worker DeploymentThe new |
||
|
|
||
| func (ts *WorkerDeploymentTestSuite) TestPinnedBehaviorThreeWorkers() { | ||
| if os.Getenv("DISABLE_SERVER_1_27_TESTS") != "" { | ||
| ts.T().Skip("temporal server 1.27+ required") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only disable versioning instead of removing the whole thing? better to keep the deployment name and build id if user has given it (to keep in the events).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make any difference for an activity only task queue? I don't see any difference in the history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might add the deployment options in activity events later