Skip to content

fix: don't raise from Actor.set_status_message on a failed or slow update - #1200

Merged
vdusek merged 5 commits into
masterfrom
fix/set-status-message-swallow
Oct 29, 2026
Merged

vdusek merged 5 commits into
masterfrom
fix/set-status-message-swallow

Conversation

@vladfrangu

Copy link
Copy Markdown
Member

Actor.set_status_message() no longer raises when the run update fails. It logs a warning and returns None, the same value it returns locally, and abandons an update that takes longer than one second. This matches the JavaScript SDK (apify/apify-sdk-js#807).

  • The missing-run-id RuntimeError on the platform is kept, since it marks a broken environment rather than a transient API failure.
  • The exit() guard around the terminal status message is untouched.
  • Unit tests cover the successful, failing and timed-out update paths.
  • Upgrading guide has a short subsection.

BREAKING CHANGE: Actor.set_status_message() returns None instead of raising when the run update fails or times out, and logs a new warning Failed to set status message for Actor run with ID "...".

Closes #1199

[🤖] Claude Code using Fable 5.1

`Actor.set_status_message()` no longer raises when the run update fails. It logs a warning and returns `None`, the same value it returns locally, and abandons an update that takes longer than one second. This matches the JavaScript SDK (apify/apify-sdk-js#807).

BREAKING CHANGE: `Actor.set_status_message()` returns `None` instead of raising when the run update fails or times out, and logs a new warning `Failed to set status message for Actor run with ID "..."`.

Closes #1199
@vladfrangu
vladfrangu requested a review from szaganek as a code owner October 21, 2026 09:08
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 21, 2026
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 21, 2026
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.42%. Comparing base (4ff9c35) to head (8814b45).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1200      +/-   ##
==========================================
+ Coverage   93.25%   93.42%   +0.16%     
==========================================
  Files          54       54              
  Lines        3766     3771       +5     
==========================================
+ Hits         3512     3523      +11     
+ Misses        254      248       -6     
Flag Coverage Δ
e2e 31.47% <14.28%> (-0.05%) ⬇️
integration 51.33% <14.28%> (-0.07%) ⬇️
unit 90.26% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

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

Well, if we do it now, it can't be marked as breaking ("fix!").

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

Feels more like a breaking change of behavior for next major release, not a fix.

@vdusek

vdusek commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Closing this, @vladfrangu feel free to reopen it if you find a way to make this non-breaking.

@vdusek vdusek closed this Oct 27, 2026
@vdusek vdusek reopened this Oct 27, 2026
@vdusek vdusek changed the title fix!: swallow and warn when setting the status message fails fix: swallow and warn when setting the status message fails Oct 27, 2026
@vdusek vdusek changed the title fix: swallow and warn when setting the status message fails fix: don't raise from Actor.set_status_message on a failed or slow update Oct 29, 2026

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

After an internal discussion, we're treating this as a non-breaking fix for a regular patch/minor release. The only code it could break is code that catches the exception set_status_message() raised on a failed update, and we don't expect anyone to rely on that. LGTM, merging.

@vdusek
vdusek merged commit 4556821 into master Oct 29, 2026
37 of 38 checks passed
@vdusek
vdusek deleted the fix/set-status-message-swallow branch October 29, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setStatusMessage() should swallow the error when the update fails

4 participants