Skip to content

feat(activity): add activity reset --clear-heartbeat-details - #1199

Open
ks-temporal wants to merge 2 commits into
mainfrom
ks/clear-heartbeat-details
Open

feat(activity): add activity reset --clear-heartbeat-details#1199
ks-temporal wants to merge 2 commits into
mainfrom
ks/clear-heartbeat-details

Conversation

@ks-temporal

@ks-temporal ks-temporal commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What changed?

Resurrects the --reset-heartbeats flag removed from activity reset
in PR #1092, as a new flag --clear-heartbeat-details. It controls the
existing reset_heartbeat field on both the single-activity request and
the batch operation, and the proto field is unchanged as ResetHeartbeat.

💥 #1092 also hardcoded reset_heartbeat: true on the batch path,
so batch resets via --query always cleared the heartbeat details, while the
single-activity did not, as the default is to not clear the details. This change
in behavior was triggered in that PR, and now this new PR reverts the
default behavior to what was before that PR.
Both paths are now controlled by this flag.

Rename #reset-heartbeats anchor to #clear-heartbeat-details
for consistency.

Tests cover the flag on both single activity and batch paths.

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes

Design

  • New flags are named after the API concept, not the implementation mechanism (good: --search-attribute, bad: --index-field)
  • New flags don't duplicate an existing flag that serves the same purpose
  • New flags do not have short aliases without strong justification

Help text (see style guide at the top of commands.yaml)

  • All flags shown in help text and examples are implemented and functional

Tests

  • Added functional test(s) (SharedServerSuite)

Resurrects the `--reset-heartbeats` flag removed from `activity reset` in
PR #1092, as a new flag `--clear-heartbeat-details`. It controls the existing
`reset_heartbeat` field on both the single-activity request and the batch
operation, and the proto field is unchanged as `ResetHeartbeat`.

resets via `--query` always cleared heartbeat details, while the
single-activity did not, as the default is to not clear the details.
Both paths are now controlled by this flag.

Rename `#reset-heartbeats` anchor to `#clear-heartbeat-details` for consistency.
Tests cover the flag on both single activity and batch paths.
@ks-temporal
ks-temporal marked this pull request as ready for review September 10, 2026 06:19
@ks-temporal
ks-temporal requested a review from a team as a code owner September 10, 2026 06:19
@ks-temporal
ks-temporal requested review from fretz12 and a balanced review from Copilot September 10, 2026 06:20

Copilot AI 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.

🟡 Changes recommended

The breaking batch-default change is not marked with 💥 in the PR title as required.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds activity reset --clear-heartbeat-details, consistently controlling heartbeat clearing for single and batch resets.

Changes:

  • Adds and documents the new flag.
  • Maps it to ResetHeartbeat for both reset paths.
  • Adds request-level and functional tests.
File summaries
File Description
internal/temporalcli/commands.yaml Defines flag and help text.
internal/temporalcli/commands.gen.go Updates generated command wiring.
internal/temporalcli/commands.activity.go Applies flag to reset requests.
internal/temporalcli/commands.activity_test.go Tests defaults, mapping, and behavior.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/temporalcli/commands.activity.go
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