Skip to content

fix: type example_run_input_body as str - #1105

Merged
vdusek merged 1 commit into
masterfrom
fix/example-run-input-body-type
Oct 8, 2026
Merged

vdusek merged 1 commit into
masterfrom
fix/example-run-input-body-type

Conversation

@vdusek

@vdusek vdusek commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

ExampleRunInput.body only accepts a string, but actor.update() and actors().create() typed example_run_input_body as Any. A dict passed the type checker and then failed with a pydantic ValidationError. The parameter is now str | None in the sync and async clients, the same as body: string in the JS client, and the docstring says to pass a serialized string such as json.dumps(input).

Closes: #1102

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 8, 2026
@vdusek vdusek self-assigned this Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.39%. Comparing base (966d3d6) to head (8da3ee7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1105      +/-   ##
==========================================
- Coverage   95.40%   95.39%   -0.02%     
==========================================
  Files          61       61              
  Lines        5880     5880              
==========================================
- Hits         5610     5609       -1     
- Misses        270      271       +1     
Flag Coverage Δ
integration 91.30% <ø> (+0.06%) ⬆️
unit 88.33% <ø> (-0.02%) ⬇️

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 marked this pull request as ready for review October 8, 2026 07:44
@vdusek
vdusek requested a review from Mantisus October 8, 2026 07:44

@Mantisus Mantisus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

@vdusek
vdusek merged commit a1047fa into master Oct 8, 2026
32 checks passed
@vdusek
vdusek deleted the fix/example-run-input-body-type branch October 8, 2026 10:32
vdusek added a commit that referenced this pull request Oct 9, 2026
…1084)

Python twin of apify/apify-client-js#1105.

`call(logger=...)` and `get_streamed_log()` sometimes redirected no log
lines. Before a run writes its first line, the API answers `GET
/logs/:id?stream=1` with an empty 200 that closes at once, and
`StreamedLog` / `StreamedLogAsync` took that as the whole log.

Both now reopen an empty stream after a pause that starts at 0.5 s and
doubles up to 5 s. If `stop()` comes before anything has arrived, they
read the log once with `get_as_bytes()`. `start()` resets that state, so
a restarted instance behaves the same.

Tests cover the same cases as #1105 for both classes and both HTTP
clients, plus the backoff and a restart.

*✍️ Drafted by Claude Code*
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

example_run_input_body is typed Any but only accepts a string

3 participants