-
Notifications
You must be signed in to change notification settings - Fork 900
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
never allow drainage info to be nil if the version stopped accepting new workflows #7343
base: main
Are you sure you want to change the base?
Conversation
d.syncSummary(ctx) | ||
} else { | ||
mergedInfo.Status = d.VersionState.DrainageInfo.Status | ||
mergedInfo.LastChangedTime = d.VersionState.DrainageInfo.LastChangedTime |
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.
Should change the child wf to not send a singal at the beginning now? it's awkward for LastCheckedTime to change a few milliseconds.
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.
done
@@ -233,6 +236,14 @@ func (d *VersionWorkflowRunner) handleUpdateVersionMetadata(ctx workflow.Context | |||
} | |||
|
|||
func (d *VersionWorkflowRunner) startDrainage(ctx workflow.Context, isCan bool) { | |||
if d.VersionState.GetDrainageInfo().GetStatus() == enumspb.VERSION_DRAINAGE_STATUS_UNSPECIFIED { | |||
now := timestamppb.New(workflow.Now(ctx)) | |||
d.VersionState.DrainageInfo = &deploymentpb.VersionDrainageInfo{ |
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.
hopefully no logic depends on VersionState.DrainageInfo
otherwise we have to patch.
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.
I remember making sure that everything did VersionState.GetDrainageInfo().GetStatus()
so it /should/ just say unspecified if it's nil due to the gap between child starting and signal arriving
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.
I mean workflow patch for NDE
@@ -62,17 +61,6 @@ func DrainageWorkflow( | |||
|
|||
// Set status = DRAINING and then sleep for visibilityGracePeriod (to let recently-started workflows arrive in visibility) | |||
if !args.IsCan { // skip if resuming after the parent continued-as-new | |||
parentWf := workflow.GetInfo(ctx).ParentWorkflowExecution |
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.
you need a wf patch here
What changed?
Set version to
DRAINING
before starting child instead of relying on child's signalWhy?
How did you test it?
Potential risks
Documentation
Is hotfix candidate?