Repository navigation
feat: sync with apify-sdk-js (week of 2026-11-16) - #40
Merged
Merged
Conversation
…ver Actor runs, Google Sheets links in the input, no charge of nothing - Port apify-sdk-js #831: `ChargeOptions::request_id`, multi-tenant Server Actor runs priced from the Actor's pricing history, `Actor::get_current_run`. - Port apify-sdk-js #859: Google Sheets sharing links in `requestsFromUrl` input entries become CSV export links. - Port apify-sdk-js #854: a charge of 0 events is not sent or counted, and its key is not kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016XtpQvffXFPk67HTT5HDLy
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.
Weekly sync from apify-sdk-js. It covers JS commits from 2026-11-02 to 2026-11-16 (up to #864).
Ported
ChargeOptions::request_idis new. It is sent with every charge and written to the local charging log.standby.deploymentstarts withMULTI_TENANTtakes its pricing from the Actor'spricingInfos. It uses the latest entry withstartedAt <= now. The budget is infinite and the charged counts start empty.chargeneeds a non-emptyrequest_id. A synthetic event is refused. Every call is sent, and nothing is counted locally.push_data_and_charge*, buffered pushes withcharge_events) fails withChargingError::PushInMultiTenantRunbefore anything is stored. Plain pushes are stored and not charged.Actor::get_current_run()is new. It fetches the run once and keeps it, as in JS.ChargingManager::is_multi_tenant()is new.get_input_raw/get_inputreplace a Google Sheets sharing link in therequestsFromUrlentries of array fields with the link of its CSV export. The new module isapify::google_sheets, with the JS test cases.Already covered or not applicable
checkAccessin the constructor):ProxyConfiguration::newalready takescheck_accessin its options. Rust has no separateinitializestep.-Secssuffix on lock methods): the Rust methods already take aDurationand have no suffix.APIFY_LOCAL_STORAGE_DIR): the Rust SDK never read it.?? undefinedchange to the proxy password in #831: this is a JS typing detail only.Decisions to check
Actorand passes getters to theChargingManager. Here theChargingManagerowns both caches, because it already has the client and the configuration.Actor::get_current_rundelegates to it.ChargingManager::newkeeps its signature.initfor standby runs. Here charging init fetches the run and the Actor at the same time whenAPIFY_META_ORIGINisSTANDBY. In other runs, it fetches the Actor only when the run is multi-tenant. This is noted indocs/allowed-differences.md.regexcrate. The JS regex rejects published links (/d/e/...) with(?!e\/). Rust checks for them after the match.\wis written as ASCII, as in JS.u64, so a negative count cannot happen. This is noted indocs/allowed-differences.md.fbcdc9c. The golden charging cases have no zero or negative counts, so this sync does not change them. I did not bump the pin.requestsFromUrlat the pinned revision. JS #4377 removed that rewrite, and the crawlee-rs sync PR of this week ports the removal. Running both rewrites is harmless, because an export link is left as it is. I did not change the crawlee-rs pin in this PR.Tests
tests/charging.rschecks multi-tenant pricing and therequest_idrules. It also checks that deduplication is left to the platform and that a run without pay-per-event pricing ignores charges. A run of one tenant sendsrequestIdtoo.tests/actor.rshas two new tests. One is an end-to-end multi-tenant run: a refused charged push, an uncharged plain push, a per-request charge and one run fetch. The other checks the input rewrite. The FakeApi can now serve set runs and Actors.Generated by Claude Code