Skip to content

feat: forward worker heartbeat options and report temporal-php SDK identity - #790

Merged
rustatian merged 4 commits into
masterfrom
feature/issue-720-worker-heartbeat
Aug 7, 2026
Merged

feat: forward worker heartbeat options and report temporal-php SDK identity#790
rustatian merged 4 commits into
masterfrom
feature/issue-720-worker-heartbeat

Conversation

@xepozz

@xepozz xepozz commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Reason for This PR

Follow-up to temporalio/sdk-php#720. Worker heartbeating is emitted by the
embedded Go SDK inside this plugin, so both the config pass-through and the
SDK-identity fix belong here rather than in sdk-php.

Description of Changes

Two related changes to worker heartbeating:

  • Configurable interval / disable. New temporal config keys
    worker_heartbeat_interval (duration, 1s60s; omit for the sdk-go 60s
    default) and disable_worker_heartbeat (bool), wired into
    client.Options.WorkerHeartbeatInterval. Out-of-range values are rejected in
    InitDefault with a clear error instead of panicking inside tclient.Dial.
  • Accurate SDK identity. The embedded Go SDK stamps its own
    SdkName/SdkVersion (temporal-go) into the heartbeat body; the existing
    rewriteNameAndVersion interceptor only rewrote the gRPC headers. It now also
    rewrites the heartbeat body for both RPCs that carry one —
    RecordWorkerHeartbeat and ShutdownWorker — so PHP workers report as
    temporal-php-2 + the PHP-SDK version. Confirmed on a live server via
    temporal worker describe.

No sdk-go or sdk-php changes required. Schema entries and unit tests included.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

PR Checklist

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md. — N/A: no CHANGELOG.md in this repo.
  • All added/changed functionality is tested.

@xepozz
xepozz requested a review from rustatian as a code owner July 28, 2026 15:26
@rustatian

Copy link
Copy Markdown
Collaborator

Hey @xepozz 👋🏻
Please update go.work + go.mod to the latest Go versions.

@rustatian rustatian added the C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. label Jul 28, 2026
@xepozz

xepozz commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

would you like me to merge all dependabot suggestions as well?

@rustatian

Copy link
Copy Markdown
Collaborator

Yeah, you can merge them into your PR as well.

Comment thread config.go Outdated
Comment thread internal.go Outdated
Comment thread config_test.go Outdated
Comment thread internal.go Outdated
xepozz added 3 commits July 31, 2026 17:59
Add worker_heartbeat_interval to the temporal config, wired into
client.Options.WorkerHeartbeatInterval. Out-of-range values are clamped to the
sdk-go range (1s-60s) with a warning instead of panicking in Dial. Includes schema
entry and an end-to-end test that a configured worker heartbeats to the server.

Signed-off-by: Dmitriy Derepko <xepozz@list.ru>
Signed-off-by: Dmitriy Derepko <xepozz@list.ru>
…37.3

Signed-off-by: Dmitriy Derepko <xepozz@list.ru>
@xepozz
xepozz force-pushed the feature/issue-720-worker-heartbeat branch from b0ab7fa to 6f38519 Compare July 31, 2026 13:59
@rustatian
rustatian self-requested a review August 6, 2026 17:40

@rustatian rustatian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thank you @xepozz 👍🏻

@rustatian
rustatian enabled auto-merge August 6, 2026 17:42
@rustatian
rustatian merged commit c3a5f68 into master Aug 7, 2026
10 of 18 checks passed
@rustatian
rustatian deleted the feature/issue-720-worker-heartbeat branch August 7, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants