Skip to content

feat: add max_total_charge_usd to Actor.start_task and Actor.call_task - #1167

Merged
vdusek merged 5 commits into
masterfrom
chore/bump-apify-client-3.2.2b11
Oct 9, 2026
Merged

vdusek merged 5 commits into
masterfrom
chore/bump-apify-client-3.2.2b11

Conversation

@vdusek

@vdusek vdusek commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Moves the SDK to apify-client 3.3.0 and picks up its new task option.

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels 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 92.88%. Comparing base (b90a8f4) to head (ab83502).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1167   +/-   ##
=======================================
  Coverage   92.88%   92.88%           
=======================================
  Files          53       53           
  Lines        3554     3554           
=======================================
  Hits         3301     3301           
  Misses        253      253           
Flag Coverage Δ
e2e 32.80% <100.00%> (ø)
integration 53.26% <100.00%> (ø)
unit 89.50% <100.00%> (ø)

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 changed the title chore: bump apify-client to 3.2.2b11 chore: bump apify-client to 3.3.0 Oct 8, 2026
@vdusek vdusek changed the title chore: bump apify-client to 3.3.0 feat: add max_total_charge_usd to Actor.start_task and Actor.call_task Oct 8, 2026
@vdusek
vdusek added this pull request to stack #1169 October 8, 2026 13:35
@vdusek
vdusek requested review from Mantisus and barjin October 8, 2026 13:36
@vdusek
vdusek marked this pull request as ready for review October 8, 2026 13:38
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 8, 2026

@barjin barjin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @vdusek , one more wording nit (probably needs an update for all the methods - start and call too - but otherwise lgtm. Cheers!

Comment thread src/apify/_actor.py Outdated

@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 changed the title feat: add max_total_charge_usd to Actor.start_task and Actor.call_task feat: add max_total_charge_usd to Actor.start_task and Actor.call_task Oct 9, 2026
@vdusek
vdusek merged commit e3d36b9 into master Oct 9, 2026
31 of 32 checks passed
@vdusek
vdusek deleted the chore/bump-apify-client-3.2.2b11 branch October 9, 2026 11:30
vdusek added a commit that referenced this pull request Oct 9, 2026
`max_items` is a leftover from the pay-per-result pricing model. The
platform applies it to pay-per-event Actors only when
`max_total_charge_usd` is not set, by turning it into a charge limit
priced by the Actor's `apify-default-dataset-item` event or its last
pay-per-result price. On any other Actor it does nothing, and the name
doesn't suggest that.

- The `max_items` docstrings on `Actor.start`, `Actor.call`,
`Actor.start_task`, `Actor.call_task` and `Actor.resurrect` mark it
deprecated (removal in 5.0.0) and describe what it really does.
- Passing `max_items` emits a `FutureWarning` that recommends
`max_total_charge_usd`. I picked `FutureWarning` over
`DeprecationWarning` because Python hides `DeprecationWarning` unless
the caller is `__main__`, so it would never show up in an Actor's run
log.

Stacked on #1167, which adds `max_total_charge_usd` to the task methods.
Raised in
#1166 (comment);
the JS counterpart is apify/apify-sdk-js#768.

*✍️ Drafted by Claude Code*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. 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.

4 participants