Skip to content

Add healthy heartbeating activities to throughput_stress - #519

Open
lilydoar wants to merge 4 commits into
lilydoar/nexus-signal-request-idfrom
lilydoar/healthy-heartbeat-activities
Open

lilydoar wants to merge 4 commits into
lilydoar/nexus-signal-request-idfrom
lilydoar/healthy-heartbeat-activities

Conversation

@lilydoar

@lilydoar lilydoar commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Add opt-in healthy heartbeat activities to each throughput iteration, with configurable count, duration and heartbeat timeout. Each has a single attempt, so a heartbeat timeout fails the workflow and load. Nonpositive and overflowing timing configurations are rejected before execution.

Review: As a single unit in stack order.

Why

The existing retry probes intentionally withhold heartbeats on their first attempt. They cover failure handling but do not exercise activities that must stay alive by heartbeating throughout useful work.

Details worth reviewing

Merge after #518, including its SDK prerequisite. The activity count defaults to zero; the action uses the Go worker's existing heartbeat support. Local heartbeat calls remain subject to SDK transport batching.

@lilydoar
lilydoar requested review from a team as code owners October 20, 2026 19:04
@lilydoar
lilydoar force-pushed the lilydoar/healthy-heartbeat-activities branch from e4b7a42 to 3d50d6b Compare October 20, 2026 19:23
@lilydoar
lilydoar changed the base branch from main to lilydoar/nexus-signal-request-id October 20, 2026 19:23
@lilydoar
lilydoar added this pull request to stack #520 October 20, 2026 19:23
@lilydoar
lilydoar force-pushed the lilydoar/healthy-heartbeat-activities branch from 3d50d6b to 924ff73 Compare October 20, 2026 20:27
@lilydoar
lilydoar force-pushed the lilydoar/healthy-heartbeat-activities branch from 924ff73 to f19f33b Compare October 26, 2026 20:55
@lilydoar
lilydoar removed this pull request from stack #520 October 26, 2026 20:56
@lilydoar
lilydoar added this pull request to stack #529 October 26, 2026 20:57
@lilydoar
lilydoar force-pushed the lilydoar/healthy-heartbeat-activities branch 2 times, most recently from 6fc6a83 to 4043d3c Compare October 26, 2026 21:16

@THardy98 THardy98 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.

Left a comment - not blocking, but would like to understand the reasoning behind the comment.

Comment thread scenarios/throughput_stress.go Outdated
}), DefaultRemoteActivity)
}

// A missed heartbeat must fail the load.

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.

is this codified anywhere?
i dont immediately see why it should cause a failure - is it scenario-specific?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is specific to the optional healthy-heartbeat probe, rather than a general rule for all activities.

The intent is to exercise an activity that stays alive through sustained heartbeating. It has MaximumAttempts: 1 so an activity retry cannot mask a heartbeat timeout. That policy is encoded in healthyHeartbeatActivity and asserted by TestThroughputStressHealthyHeartbeatActivities; the real-worker test verifies that the activity survives longer than its heartbeat timeout.

The comment is too broad, though. A failed individual heartbeat RPC does not necessarily fail the activity: subsequent heartbeats can still arrive before the timeout. An actual heartbeat timeout fails this activity and propagates through the scenario’s existing failure handling.

I will narrow the comment to explain the single-attempt choice: “Keep heartbeat timeouts observable rather than masking them with activity retries.” This is a probe-specific testing choice, not a general requirement that every missed heartbeat must fail a load.

throughput_stress only heartbeats in its retry scenario, where the first
attempt deliberately times out. Nothing exercises activities that stay alive
by heartbeating, so load runs cover the heartbeat failure path but not
sustained successful heartbeats.

healthy-heartbeat-activities adds that many remote activities to each internal
iteration. Each heartbeats for healthy-heartbeat-duration with a
healthy-heartbeat-timeout heartbeat timeout and a single attempt, so a
heartbeat timeout fails the run. Off by default. Uses the Go worker's existing
heartbeat activity, so no worker change is needed.
@lilydoar
lilydoar force-pushed the lilydoar/healthy-heartbeat-activities branch from 4043d3c to e784836 Compare October 27, 2026 20:55
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