Skip to content

feat(controller): emit a Warning event on gate/test workflow terminal failure#457

Merged
jaypipes merged 2 commits into
temporalio:mainfrom
wankhede04:feat/gate-workflow-failure-event
Jul 24, 2026
Merged

feat(controller): emit a Warning event on gate/test workflow terminal failure#457
jaypipes merged 2 commits into
temporalio:mainfrom
wankhede04:feat/gate-workflow-failure-event

Conversation

@wankhede04

Copy link
Copy Markdown
Contributor

What was changed?

  • internal/controller/genstatus.go: add isGateWorkflowTerminalFailure and emit a Warning event (GateWorkflowFailed) the first time a gate/test workflow for the target version is observed to have ended in a non-successful terminal state (Failed, Canceled, Terminated, TimedOut). The previous reconcile's recorded status is compared against the freshly-fetched status so the event only fires once per transition, not on every reconcile loop.
  • internal/controller/util.go: add the ReasonGateWorkflowFailed event reason constant.

Why?

Split out of #448 per review feedback from @jaypipes: "I'd love to see this split into two PRs, one that adds the warning event emission for gate workflow failures and another that adds the poller health checking." This PR is the gate-workflow-failure half; #448 now contains only the poller-health-checking work.

Also directly relates to #447 / #50: @carlydf's comment on #50 states "We should surface worker healthcheck error and Gate workflow failure in the TemporalWorkerDeployment events for sure," calling out Gate workflow failure surfacing as in-scope independent of the post-GA rollout-acceptance-testing work.

How was this tested?

  • gofmt -l . — clean
  • go vet ./... — clean
  • go build ./... — succeeds
  • make GOLANGCI_LINT_FIX=false GOLANGCI_LINT_BASE_REV=main lint-code — 0 issues
  • go test ./internal/controller/... — all pass

Risks

This is purely additive: one new event-reason constant and one new Warning event emission, with no changes to rollout/reconciliation decision logic or existing status fields.

… failure

Split out of PR temporalio#448 per review feedback from @jaypipes, who asked for
this to land as its own PR since it's orthogonal to the poller-health
checking work.

Emits a Warning event the first time a gate/test workflow for the
target version is observed to have ended in a non-successful terminal
state (Failed, Canceled, Terminated, TimedOut). The previous
reconcile's recorded status is compared against the freshly-fetched
status so the event only fires once per transition, not on every
reconcile loop.

Related to temporalio#447 / temporalio#50: @carlydf's comment on temporalio#50 calls out surfacing
Gate workflow failure in TemporalWorkerDeployment events as in-scope
independent of the post-GA rollout-acceptance-testing work.
@jaypipes
jaypipes self-requested a review July 24, 2026 11:17

@jaypipes jaypipes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks @wankhede04 :)

@jaypipes
jaypipes merged commit f7e3c0c into temporalio:main Jul 24, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants