-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Include WCI connectivity health in worker deployment API #10778
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
Changes from all commits
e442af1
defa8c3
31d3aad
508269b
9c021ac
d5db497
2d15ad9
b54346f
b42d60c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ import ( | |
| deploymentpb "go.temporal.io/api/deployment/v1" | ||
| enumspb "go.temporal.io/api/enums/v1" | ||
| "go.temporal.io/api/serviceerror" | ||
| wciiface "go.temporal.io/auto-scaled-workers/wci/workflow/iface" | ||
| sdkclient "go.temporal.io/sdk/client" | ||
| sdklog "go.temporal.io/sdk/log" | ||
| "go.temporal.io/sdk/temporal" | ||
|
|
@@ -227,6 +228,20 @@ func (d *VersionWorkflowRunner) listenToSignals(ctx workflow.Context) { | |
| }) | ||
| } | ||
|
|
||
| // Version gate for sync-validation-status signal to prevent NDEs during rollback | ||
| if workflow.GetVersion(ctx, "sync-validation-status-signal", workflow.DefaultVersion, 0) >= 0 { | ||
|
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. It seems we've been doing this patchings for other signal handlers, but I don't think patching (
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. Good point. Will clean this up in a follow-up PR |
||
| syncValidationStatusChannel := workflow.GetSignalChannel(ctx, worker_versioning.SignalSyncValidationStatus) | ||
| d.signalHandler.signalSelector.AddReceive(syncValidationStatusChannel, func(c workflow.ReceiveChannel, more bool) { | ||
| d.signalHandler.processingSignals++ | ||
| defer func() { d.signalHandler.processingSignals-- }() | ||
|
|
||
| var vs wciiface.ValidationStatus | ||
| c.Receive(ctx, &vs) | ||
| d.VersionState.ComputeStatus = wciValidationStatusToComputeStatus(&vs) | ||
| d.syncSummary(ctx) // propagate updated ComputeStatus to deployment workflow | ||
| }) | ||
|
smuneebahmad marked this conversation as resolved.
|
||
| } | ||
|
smuneebahmad marked this conversation as resolved.
|
||
|
|
||
| // Keep waiting for signals, when it's time to CaN the main goroutine will exit. | ||
| for { | ||
| d.signalHandler.signalSelector.Select(ctx) | ||
|
|
@@ -1056,6 +1071,7 @@ func versionStateToSummary(s *deploymentspb.VersionLocalState) *deploymentspb.Wo | |
| LastDeactivationTime: s.LastDeactivationTime, | ||
| Status: s.Status, | ||
| ComputeConfig: s.ComputeConfig, | ||
| ComputeStatus: s.ComputeStatus, | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.