-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add one-time versioning override #10763
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 |
|---|---|---|
|
|
@@ -984,14 +984,14 @@ func (t *transferQueueActiveTaskExecutor) processStartChildExecution( | |
| } | ||
| } | ||
|
|
||
| // Pinned override is inherited if Task Queue of new run is compatible with the override version. | ||
| var inheritedPinnedOverride *workflowpb.VersioningOverride | ||
| if o := mutableState.GetExecutionInfo().GetVersioningInfo().GetVersioningOverride(); worker_versioning.OverrideIsPinned(o) { | ||
| inheritedPinnedOverride = o | ||
| // Pinned and one-time overrides are inherited if Task Queue of new run is compatible with the override version. | ||
|
Member
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. the reason why the child workflow path is receiving this special treatment but none of CAN/retry/cron paths are is because of the following idea:
|
||
| var inheritedVersioningOverride *workflowpb.VersioningOverride | ||
| if o := mutableState.GetExecutionInfo().GetVersioningInfo().GetVersioningOverride(); worker_versioning.GetOverrideTargetDeploymentVersion(o) != nil { | ||
| inheritedVersioningOverride = o | ||
| newTQ := attributes.GetTaskQueue().GetName() | ||
| if newTQ != mutableState.GetExecutionInfo().GetTaskQueue() && !newTQInPinnedVersion || | ||
| attributes.GetNamespaceId() != mutableState.GetExecutionInfo().GetNamespaceId() { // don't inherit pinned version if child is in a different namespace | ||
| inheritedPinnedOverride = nil | ||
| attributes.GetNamespaceId() != mutableState.GetExecutionInfo().GetNamespaceId() { // don't inherit override if child is in a different namespace | ||
| inheritedVersioningOverride = nil | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -1091,7 +1091,7 @@ func (t *transferQueueActiveTaskExecutor) processStartChildExecution( | |
| inheritedBuildId, | ||
| initiatedEvent.GetUserMetadata(), | ||
| shouldTerminateAndStartChild, | ||
| inheritedPinnedOverride, | ||
| inheritedVersioningOverride, | ||
| inheritedPinnedVersion, | ||
| priorities.Merge(mutableState.GetExecutionInfo().Priority, attributes.Priority), | ||
| inheritedAutoUpgradeInfo, | ||
|
|
@@ -1665,7 +1665,7 @@ func (t *transferQueueActiveTaskExecutor) startWorkflow( | |
| inheritedBuildId string, | ||
| userMetadata *sdkpb.UserMetadata, | ||
| shouldTerminateAndStartChild bool, | ||
| inheritedPinnedOverride *workflowpb.VersioningOverride, | ||
| inheritedVersioningOverride *workflowpb.VersioningOverride, | ||
| inheritedPinnedVersion *deploymentpb.WorkerDeploymentVersion, | ||
| priority *commonpb.Priority, | ||
| inheritedAutoUpgradeInfo *deploymentpb.InheritedAutoUpgradeInfo, | ||
|
|
@@ -1690,7 +1690,7 @@ func (t *transferQueueActiveTaskExecutor) startWorkflow( | |
| Memo: attributes.Memo, | ||
| SearchAttributes: attributes.SearchAttributes, | ||
| UserMetadata: userMetadata, | ||
| VersioningOverride: inheritedPinnedOverride, | ||
| VersioningOverride: inheritedVersioningOverride, | ||
| Priority: priority, | ||
| TimeSkippingConfig: attributes.GetTimeSkippingConfig(), | ||
| } | ||
|
|
||
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.
this is something which i just over thought while working on this, or something we missed while we wrote update workflow options?
question: why don't we have these mask options for all the paths for api's that were added in the v0.32 phase? cc - @carlydf
have added them here, but could be totally off hence the q