Skip to content

STOR-5542: Allow ctx.abort() to disable alarm retries - #6996

Merged
apeacock1991 merged 1 commit into
mainfrom
apeacock/no-retry-alarm-abort
Aug 20, 2026
Merged

STOR-5542: Allow ctx.abort() to disable alarm retries#6996
apeacock1991 merged 1 commit into
mainfrom
apeacock/no-retry-alarm-abort

Conversation

@apeacock1991

@apeacock1991 apeacock1991 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Allow Durable Object alarm handlers to call ctx.abort(reason, { retryAlarm: false }) to reset the object without retrying the alarm. Calls without the option retain the existing retry behavior.

Add an ABORTED event outcome and preserve the retry decision through both handler and output-gate error paths. Preserve replacement alarms queued while asynchronous abandonment is in progress.

@ask-bonk

ask-bonk Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

2 similar comments
@ask-bonk

ask-bonk Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@apeacock1991 Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing apeacock/no-retry-alarm-abort (67dd86a) with main (6dd2348)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from 03f2449 to 43ddb05 Compare August 14, 2026 09:47
@apeacock1991
apeacock1991 marked this pull request as ready for review August 14, 2026 10:07
@apeacock1991
apeacock1991 requested review from a team as code owners August 14, 2026 10:07
@apeacock1991 apeacock1991 changed the title Allow alarms not to retry when calling ctx.abort() STOR-5542: Allow alarms not to retry when calling ctx.abort() Aug 14, 2026

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

Approving from a typings point of view

@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from 43ddb05 to 6e9d369 Compare August 17, 2026 08:26
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

Comment thread src/workerd/server/alarm-scheduler-test.c++
@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from 6e9d369 to e4d305f Compare August 17, 2026 09:42
@apeacock1991 apeacock1991 changed the title STOR-5542: Allow alarms not to retry when calling ctx.abort() STOR-5542: Alarms no longer retry when calling ctx.abort() via new compat flag Aug 17, 2026
@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from e4d305f to 6439f28 Compare August 17, 2026 09:59
@apeacock1991
apeacock1991 requested a review from jqmmes August 17, 2026 10:11
@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from 6439f28 to 9aaae62 Compare August 18, 2026 08:56
@apeacock1991 apeacock1991 changed the title STOR-5542: Alarms no longer retry when calling ctx.abort() via new compat flag STOR-5542: Allow ctx.abort() to disable alarm retries Aug 18, 2026
@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.00000% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.45%. Comparing base (6dd2348) to head (67dd86a).

Files with missing lines Patch % Lines
src/workerd/api/global-scope.c++ 0.00% 24 Missing ⚠️
src/workerd/server/alarm-scheduler.c++ 55.55% 12 Missing and 4 partials ⚠️
src/workerd/server/alarm-scheduler-test.c++ 90.10% 0 Missing and 9 partials ⚠️
src/workerd/api/actor-state.c++ 28.57% 4 Missing and 1 partial ⚠️
src/workerd/io/trace-stream.c++ 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6996      +/-   ##
==========================================
+ Coverage   67.43%   67.45%   +0.01%     
==========================================
  Files         457      457              
  Lines      127865   127995     +130     
  Branches    20918    20940      +22     
==========================================
+ Hits        86231    86339     +108     
- Misses      28992    29001       +9     
- Partials    12642    12655      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/workerd/api/actor-state.c++
@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from 9aaae62 to ab9fc37 Compare August 20, 2026 09:51
Add an ABORTED event outcome and propagate whether an alarm abort should
retry through the runtime layers.

Allow ctx.abort(..., { retryAlarm: false }) to make an alarm terminal.
Preserve replacement alarms queued while asynchronous cleanup is in
progress.
@apeacock1991
apeacock1991 force-pushed the apeacock/no-retry-alarm-abort branch from ab9fc37 to 67dd86a Compare August 20, 2026 12:17
@apeacock1991
apeacock1991 merged commit 275dc09 into main Aug 20, 2026
22 of 25 checks passed
@apeacock1991
apeacock1991 deleted the apeacock/no-retry-alarm-abort branch August 20, 2026 14:23
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.

4 participants