Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1191 +/- ##
==========================================
+ Coverage 93.00% 93.10% +0.10%
==========================================
Files 54 54
Lines 3672 3683 +11
==========================================
+ Hits 3415 3429 +14
+ Misses 257 254 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
October 16, 2026 11:32
vdusek
requested review from
Mantisus and
Pijukatel
and removed request for
szaganek
October 16, 2026 11:32
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a charge goes over the remaining
max_total_charge_usdbudget, the SDK charges one event more than the budget covers, so the platform detects the exhausted budget and stops the run.push_datalets one item through when the budget can't cover a single one, and a run that is already strictly over budget gets nothing more. This ports the JS SDK behavior from apify/apify-sdk-js#574. As in JS, the push data limit applies only to pay-per-event runs.It changes what users see: a run sitting exactly at its budget gets one more event on the next charge,
max_total_charge_usd=0lets one event through, and callers that ignoreChargeResultcan get one extra charged event and dataset item. Thecharge()docstrings and the exceptions docs page describe the rule.The PPE E2E tests are updated for the new counts.
test_actor_charge_limitexpects 3 charges, as the JS E2E test does. The Scrapy PPE spider test uses a $0.075 budget, expects 2 charges and 2 items, and acceptsSUCCEEDEDorABORTED, since the platform's abort can race the Actor's own exit.Closes: #1187
✍️ Drafted by Claude Code