Skip to content

feat: warn rental Actor publishers about the rental model sunset - #1347

Merged
patrikbraborec merged 4 commits into
masterfrom
feat/rental-sunset-notice
Aug 26, 2026
Merged

patrikbraborec merged 4 commits into
masterfrom
feat/rental-sunset-notice

Conversation

@patrikbraborec

@patrikbraborec patrikbraborec commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Closes #1344

Users with at least one rental Actor published in Apify Store get a notice after each CLI command:

image
  • The notice names both milestones, then points at the pay-per-event migration guide (https://blog.apify.com/migrating-to-pay-per-event-pricing/) for the switch and at #project-rentals on Discord for questions.
  • Runs from ApifyCommand._run's finally, so it prints after the command's own output, in both entrypoints. Goes to stderr, so --json payloads stay clean.
  • Detection: one unauthenticated GET /v2/store?username=<you>&pricingModel=FLAT_PRICE_PER_MONTH&limit=1. Username is read from auth.json directly — getLocalUserInfo() would hit the OS keyring and pop a keychain prompt on commands that need no auth.
  • Printed at most once a day; the Store lookup is cached for a day in ~/.apify/state.json. Skipped in CI, and auto-expires on 2026-10-01 so old CLI versions stop nagging after the migration. Never throws.
  • Opt-out: APIFY_CLI_SKIP_RENTAL_SUNSET_NOTICE=1 (also set suite-wide in vitest.config.ts).

Users with at least one rental Actor in Apify Store now get a notice after
each command, at most once a day, until rental Actors are retired.
@github-actions github-actions Bot added this to the 148th sprint - Builders team milestone Aug 25, 2026
@github-actions github-actions Bot added t-builders Issues owned by the Builders team. tested Temporary label used only programatically for some analytics. labels Aug 25, 2026
- Look the Store up through axios so the request honors HTTP_PROXY/HTTPS_PROXY/NO_PROXY,
  and send the same origin headers as the rest of the CLI.
- Treat a non-2xx response and a 200 that is not a Store response as "unknown" rather than
  zero, so a captive portal or an outage cannot cache the notice away; fall back to the
  cached count instead.
- Cache failed lookups as checked so a hanging connection does not cost the request timeout
  on every command.
- Move the daily print throttle into `wasNotifiedRecently`, keyed per account, so logging in
  as somebody else does not inherit the previous user's timestamp.
- Skip rewriting the state file on a quiet cache hit.
- Spell out the years in the notice and say how to silence it.
The notice said what was ending but not what to do about it. It now names the
deadline for switching to pay-per-event and links the migration guide, and the
Discord line is reworded so the two links read as different purposes.
@l2ysho
l2ysho requested a review from apify-factory August 25, 2026 11:12

@apify-factory apify-factory 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.

Looks good, nothing blocking.

@patrikbraborec
patrikbraborec merged commit ffc6605 into master Aug 26, 2026
24 checks passed
@patrikbraborec
patrikbraborec deleted the feat/rental-sunset-notice branch August 26, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-builders Issues owned by the Builders team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add warning message about rental sunset

5 participants