Skip to content

Conversation

@yuandrew
Copy link
Contributor

@yuandrew yuandrew commented Oct 24, 2025

NOTE: This PR needs a server patch release that includes sending this information in namespace capabilities.

What was changed

Call DescribeNamespace and gate worker heartbeating from the worker_heartbeat Capability

Why?

So older servers without this support don't get pinged and emit server error logs for unimplemented

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note

Before sending worker heartbeats, check DescribeNamespace for capabilities.worker_heartbeats; if unsupported or on error, warn and shut down the worker; tests updated accordingly.

  • Worker heartbeats
    • Gate heartbeating by calling describe_namespace and requiring namespace_info.capabilities.worker_heartbeats == true.
    • On unsupported capability or namespace describe error: log warning and shutdown worker.
    • On record_worker_heartbeat Unimplemented error: shutdown worker.
  • Tests
    • Update mocks to stub describe_namespace with worker_heartbeats: true.
    • Keep heartbeat assertions; expect 3 heartbeats under capability-enabled scenario.

Written by Cursor Bugbot for commit 70b9ad0. This will update automatically on new commits. Configure here.

@yuandrew yuandrew requested a review from a team as a code owner October 24, 2025 22:06
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

This makes sense to me but looks like you'll need to update a mocks etc to fix tests

@yuandrew
Copy link
Contributor Author

Added mock, need to wait for next server release for integration tests to pass, now that we're disabling heartbeating for from this feature that is added in the next release

@yuandrew yuandrew merged commit 76b66fa into temporalio:master Nov 4, 2025
62 of 65 checks passed
@yuandrew yuandrew deleted the worker-heartbeat-capabilities branch November 4, 2025 00:18
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