-
Notifications
You must be signed in to change notification settings - Fork 1.2k
No need send sync summary signal after async propagation #8689
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: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -10,20 +10,18 @@ import ( | |
| deploymentspb "go.temporal.io/server/api/deployment/v1" | ||
| "go.temporal.io/server/api/matchingservice/v1" | ||
| "go.temporal.io/server/common/namespace" | ||
| "go.temporal.io/server/common/resource" | ||
| ) | ||
|
|
||
| type ( | ||
| Activities struct { | ||
| namespace *namespace.Namespace | ||
| deploymentClient Client | ||
| matchingClient resource.MatchingClient | ||
| activityDeps | ||
| namespace *namespace.Namespace | ||
| } | ||
| ) | ||
|
|
||
| func (a *Activities) SyncWorkerDeploymentVersion(ctx context.Context, args *deploymentspb.SyncVersionStateActivityArgs) (*deploymentspb.SyncVersionStateActivityResult, error) { | ||
| identity := "worker-deployment workflow " + activity.GetInfo(ctx).WorkflowExecution.ID | ||
| res, err := a.deploymentClient.SyncVersionWorkflowFromWorkerDeployment( | ||
| res, err := a.WorkerDeploymentClient.SyncVersionWorkflowFromWorkerDeployment( | ||
| ctx, | ||
| a.namespace, | ||
| args.DeploymentName, | ||
|
|
@@ -48,7 +46,7 @@ func (a *Activities) SyncUnversionedRamp( | |
| ) (*deploymentspb.SyncDeploymentVersionUserDataResponse, error) { | ||
| logger := activity.GetLogger(ctx) | ||
| // Get all the task queues in the current version and put them into SyncUserData format | ||
| currVersionInfo, _, err := a.deploymentClient.DescribeVersion(ctx, a.namespace, input.CurrentVersion, false) | ||
| currVersionInfo, _, err := a.WorkerDeploymentClient.DescribeVersion(ctx, a.namespace, input.CurrentVersion, false) | ||
|
Member
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. nit: is changing from deploymentClient to WorkerDeploymentClient a design change only? I looked around and I think we were repeating the declaration of this earlier on but I just wanna be sure.
Contributor
Author
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. It's just the name that was there in |
||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
@@ -76,7 +74,7 @@ func (a *Activities) SyncUnversionedRamp( | |
| logger.Info("syncing unversioned ramp to task queue userdata", "taskQueue", syncData.Name, "types", syncData.Types) | ||
| var res *matchingservice.SyncDeploymentUserDataResponse | ||
| var err error | ||
| res, err = a.matchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| res, err = a.MatchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| NamespaceId: a.namespace.ID().String(), | ||
| TaskQueue: syncData.Name, | ||
| TaskQueueTypes: syncData.Types, | ||
|
|
@@ -107,7 +105,7 @@ func (a *Activities) CheckUnversionedRampUserDataPropagation(ctx context.Context | |
| for n, v := range input.TaskQueueMaxVersions { | ||
| go func(name string, version int64) { | ||
| logger.Info("waiting for unversioned ramp userdata propagation", "taskQueue", name, "version", version) | ||
| _, err := a.matchingClient.CheckTaskQueueUserDataPropagation(ctx, &matchingservice.CheckTaskQueueUserDataPropagationRequest{ | ||
| _, err := a.MatchingClient.CheckTaskQueueUserDataPropagation(ctx, &matchingservice.CheckTaskQueueUserDataPropagationRequest{ | ||
| NamespaceId: a.namespace.ID().String(), | ||
| TaskQueue: name, | ||
| Version: version, | ||
|
|
@@ -126,7 +124,7 @@ func (a *Activities) CheckUnversionedRampUserDataPropagation(ctx context.Context | |
| } | ||
|
|
||
| func (a *Activities) IsVersionMissingTaskQueues(ctx context.Context, args *deploymentspb.IsVersionMissingTaskQueuesArgs) (*deploymentspb.IsVersionMissingTaskQueuesResult, error) { | ||
| res, err := a.deploymentClient.IsVersionMissingTaskQueues( | ||
| res, err := a.WorkerDeploymentClient.IsVersionMissingTaskQueues( | ||
| ctx, | ||
| a.namespace, | ||
| args.PrevCurrentVersion, | ||
|
|
@@ -142,7 +140,7 @@ func (a *Activities) IsVersionMissingTaskQueues(ctx context.Context, args *deplo | |
|
|
||
| func (a *Activities) DeleteWorkerDeploymentVersion(ctx context.Context, args *deploymentspb.DeleteVersionActivityArgs) error { | ||
| identity := "worker-deployment workflow " + activity.GetInfo(ctx).WorkflowExecution.ID | ||
| err := a.deploymentClient.DeleteVersionFromWorkerDeployment( | ||
| err := a.WorkerDeploymentClient.DeleteVersionFromWorkerDeployment( | ||
| ctx, | ||
| a.namespace, | ||
| args.DeploymentName, | ||
|
|
@@ -160,7 +158,7 @@ func (a *Activities) DeleteWorkerDeploymentVersion(ctx context.Context, args *de | |
|
|
||
| func (a *Activities) RegisterWorkerInVersion(ctx context.Context, args *deploymentspb.RegisterWorkerInVersionArgs) error { | ||
| identity := "worker-deployment workflow " + activity.GetInfo(ctx).WorkflowExecution.ID | ||
| err := a.deploymentClient.RegisterWorkerInVersion( | ||
| err := a.WorkerDeploymentClient.RegisterWorkerInVersion( | ||
| ctx, | ||
| a.namespace, | ||
| args, | ||
|
|
@@ -173,7 +171,7 @@ func (a *Activities) RegisterWorkerInVersion(ctx context.Context, args *deployme | |
| } | ||
|
|
||
| func (a *Activities) DescribeVersionFromWorkerDeployment(ctx context.Context, args *deploymentspb.DescribeVersionFromWorkerDeploymentActivityArgs) (*deploymentspb.DescribeVersionFromWorkerDeploymentActivityResult, error) { | ||
| res, _, err := a.deploymentClient.DescribeVersion(ctx, a.namespace, args.Version, false) | ||
| res, _, err := a.WorkerDeploymentClient.DescribeVersion(ctx, a.namespace, args.Version, false) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
@@ -201,7 +199,7 @@ func (a *Activities) SyncDeploymentVersionUserDataFromWorkerDeployment( | |
| var err error | ||
|
|
||
| if input.ForgetVersion { | ||
| res, err = a.matchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| res, err = a.MatchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| NamespaceId: a.namespace.ID().String(), | ||
| DeploymentName: input.GetDeploymentName(), | ||
| TaskQueue: syncData.Name, | ||
|
|
@@ -211,7 +209,7 @@ func (a *Activities) SyncDeploymentVersionUserDataFromWorkerDeployment( | |
| }, | ||
| }) | ||
| } else { | ||
| res, err = a.matchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| res, err = a.MatchingClient.SyncDeploymentUserData(ctx, &matchingservice.SyncDeploymentUserDataRequest{ | ||
| NamespaceId: a.namespace.ID().String(), | ||
| DeploymentName: input.GetDeploymentName(), | ||
| TaskQueue: syncData.Name, | ||
|
|
@@ -250,5 +248,5 @@ func (a *Activities) StartWorkerDeploymentVersionWorkflow( | |
| logger := activity.GetLogger(ctx) | ||
| logger.Info("starting worker deployment version workflow", "deploymentName", input.DeploymentName, "buildID", input.BuildId) | ||
| identity := "deployment workflow " + activity.GetInfo(ctx).WorkflowExecution.ID | ||
| return a.deploymentClient.StartWorkerDeploymentVersion(ctx, a.namespace, input.DeploymentName, input.BuildId, identity, input.RequestId) | ||
| return a.WorkerDeploymentClient.StartWorkerDeploymentVersion(ctx, a.namespace, input.DeploymentName, input.BuildId, identity, input.RequestId) | ||
| } | ||
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.
curious: do we wanna also have a counter to track the data propagation for those users using sync workflows?
The reason why I say this is because they could make things easier to debug/understand when they have an operator's hat on
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.
If you agree to the above point I made, we need to rename the variables just fyi
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.
but we're not gonna support sync wfs for long. once we verify async then we'd make that the default and eventually cleanup async path.