Skip to content

feat(deployments): show worker deployment connection status by default - #3852

Draft
rossnelson wants to merge 3 commits into
mainfrom
reexpose-connection-status
Draft

feat(deployments): show worker deployment connection status by default#3852
rossnelson wants to merge 3 commits into
mainfrom
reexpose-connection-status

Conversation

@rossnelson

@rossnelson rossnelson commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • show the connection status by default: the Connection column on the
    deployment detail page, and the status inside the compute pill on the
    deployments list
  • keep showConnectionStatus, so a consumer can still hide the status without
    a release of this package
  • restore the Validate Connection guidance in the Pending tooltip
  • report a check that does not finish as unknown, rather than as an invalid
    connection
  • extend the unit and integration tests to cover the re-exposed path, which
    includes the detail row colspan
connection-status.mp4

Why

PR #3718 hid the connection status behind showConnectionStatus, which
defaults to false. The UI was correct. Two backend defects made the status show
a permanent Pending:

Both fixes are merged.

Where the flip belongs

The prop defaults to false, and no route in this repo passes it, so the status
never appears. Three options:

  1. Flip the default here. One change, one repo, and every consumer gets the
    status. This PR takes this option.
  2. Pass true from each consumer. This needs a change in every consumer plus
    a package bump, and it leaves a dead prop here. It does not solve the staged
    rollout problem either, because a consumer also deploys everywhere at once.
  3. Gate on a server capability. This is the only mechanism that lets an
    environment with the fixes show the status while an environment without them
    hides it, because the server reports its own support. No such capability
    exists. serverScaledDeployments is true with or without these fixes, so it
    selects the broken set rather than the fixed set. A capability that did track
    the fixes needs a change to temporalio/api and to the server, which takes
    longer than the rollout it would guard.

Option 1 with the prop kept gives the same rollback lever at lower cost: a
consumer can pass showConnectionStatus={false} if an environment turns out to
be behind.

Pending tooltip copy

Commit e6efe42 removed "or use Validate Connection to check now" because the
on-demand validation was a dry run. temporal-auto-scaled-workers#99 makes that
statement correct again. handleValidateSpec now writes the validation status
and signals the version workflow when the request carries no scaling group
changes, which is what the manual action sends. The row already refreshes after
a validation, so the badge changes in place.

The 6h claim stays. The default of
workercontroller.periodic_validation_interval_s is 21600 seconds.

Client contract

validateCurrentWorkerDeploymentVersionComputeConfig keeps its void return.
ValidateWorkerDeploymentVersionComputeConfigResponse is an empty message, so
the earlier { valid, message } shape never matched the server. The verdict
does not need that shape.

A check that does not finish is not a failed connection

The modal treated every error as a verdict:

const isValid = $derived(!result?.message);

A gateway timeout therefore read as "Connection is invalid", which is wrong. The
check never returned a result, so the connection state is unknown. The endpoint
runs a workflow update that calls a provider activity while the caller waits, so
a slow provider producing a timeout is an ordinary outcome, not an edge case.

The modal now has three states:

Outcome Trigger Modal
valid 200 Connection is valid
invalid 400 only Connection is invalid, plus the server message
indeterminate 5xx, transport failure, 401, 403, 404, 429 Could not complete the check, status unknown

InvalidArgument, which maps to 400, is the only status the backend uses for a
verdict, so it is the only one treated as one. resolveValidationOutcome holds
this mapping so it is testable away from the component.

The row now refreshes for every outcome. A check that does not return to the
browser can still finish and persist a status.

Issue(s) closed

FE-191

Test plan

  • pnpm lint: 0 errors
  • pnpm check: 0 errors
  • pnpm test -- --run: 3041 passed, 2 skipped
  • pnpm test:integration: 317 passed, 1 skipped
  • manual check against an environment carrying both backend fixes

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview Aug 25, 2026 7:01pm

Request Review

Change the default of showConnectionStatus to true on the deployments
list, the deployment detail page, and both table rows. This shows the
Connection column and the connection badge to every consumer of the
package.

Keep the prop. A consumer that must hide the column can still pass
showConnectionStatus={false} without a release of this package.

Two backend defects made the column show a permanent Pending status.
Both are corrected:

- temporalio/temporal-auto-scaled-workers#99 lets an empty ValidateSpec
  request validate the current configuration and persist the result.
- temporalio/temporal#11273 sends syncSummary(), so an updated
  ComputeStatus reaches the deployment workflow that
  DescribeWorkerDeployment reads.

Cover the re-exposed path in the tests. The unit tests show the column
by default, keep the opt-out, and add a Pending version. The integration
test shows the persisted status, then changes the badge from Pending to
Connected to Failed across two validations.
Restore the Validate Connection guidance in the Pending tooltip.

Commit e6efe42 removed this guidance because the on-demand validation
was a dry run that did not write to compute_status. That is no longer
correct. In temporalio/temporal-auto-scaled-workers#99, handleValidateSpec
writes the validation status and signals the version workflow when the
request carries no scaling group changes, which is what the manual
Validate Connection action sends.

Keep the 6h interval. The default of the dynamic configuration setting
workercontroller.periodic_validation_interval_s is 21600 seconds.
…not finish

Report an incomplete validation as unknown, not as an invalid connection.

A 504 from the validate-compute-config endpoint made the modal say
"Connection is invalid". The gateway timed out, so the check never
returned a verdict. The connection can be correct.

The backend reports a completed check that finds a problem as
InvalidArgument, which maps to HTTP 400 and carries the message it also
writes to provider_validation.error_message. Treat that status alone as a
verdict. Report every other failure, which includes 5xx, a lost
connection, and statuses such as 401 and 404, as an unknown result.

Add a third modal state for this. It shows a neutral icon, says the
status is unknown, and tells the user the check can still complete.

Refresh the row for all outcomes. A check that does not return to the
browser can still finish and persist a status.
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.

1 participant