Skip to content

fix(durable-object): fix wrong return type on durable object alarm fn - #1023

Open
Darckfast wants to merge 2 commits into
cloudflare:mainfrom
Darckfast:fix-durable-object-alarm-return-type
Open

fix(durable-object): fix wrong return type on durable object alarm fn#1023
Darckfast wants to merge 2 commits into
cloudflare:mainfrom
Darckfast:fix-durable-object-alarm-return-type

Conversation

@Darckfast

Copy link
Copy Markdown
Contributor

The alarm fn, according to Cloudflare docs https://developers.cloudflare.com/durable-objects/api/alarms/#alarm, returns void, but the workers-rs was returning a Result<Response>, this fixes by changing the return type to Result<()>

Fixes #712

Darckfast and others added 2 commits July 7, 2026 10:36
The `alarm` fn, according to Cloudflare docs https://developers.cloudflare.com/durable-objects/api/alarms/#alarm, returns `void`, but the `workers-rs` was returning a `Result<Response>`, this fixes by changing the return type to `Result<()>`

Fixes cloudflare#712
@guybedford guybedford added next major Breaking change for the next major version DO NOT MERGE labels Aug 18, 2026
@codspeed-hq

codspeed-hq Bot commented Aug 18, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 54.54%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime e2e_time 40 ms 89 ms -55.06%
WallTime worker_internal_time 40 ms 87 ms -54.02%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Darckfast:fix-durable-object-alarm-return-type (4e86e28) with main (f20a87c)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE next major Breaking change for the next major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] alarm handler should return Result<()> instead of Result<Response>

2 participants