Skip to content

fix(builds): handle reduced build data for users without write or build access - #1642

Open
HonzaKirchner wants to merge 6 commits into
masterfrom
fix/reduced-build-data-1641
Open

HonzaKirchner wants to merge 6 commits into
masterfrom
fix/reduced-build-data-1641

Conversation

@HonzaKirchner

@HonzaKirchner HonzaKirchner commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Closes #1641

The API now returns a reduced build (no stats, options or usage, and a 404 for the log; userId and meta.origin stay) to users who can read an Actor but can neither write to it nor build it. See apify/apify-core#33491 and apify/apify-core#33530.

Nothing crashed before this change; it fixes two confusing outputs:

  • apify builds info: computes the duration from the timestamps when stats is missing, instead of printing "took 0ms".
  • apify builds log: fails with "You don't have access to the log of build with ID …" instead of printing an empty log.
  • apify builds wait, apify builds ls, apify runs info, apify actors info: no change needed.

A log 404 alone can't be told apart from a build that has no log, and the API has no flag for a reduced build, so a build without options is treated as reduced (isReducedBuild). outputJobLog now returns 'no-logs' when a finished job has no log.

SCR-20261125-iitk

🤖 Generated with Claude Code

…ld access

The API returns a reduced build (no meta, stats, options, usage or log) to
users who can read an Actor but can neither write to it nor build it.

- builds info: omit origin, duration, compute units and image size when absent
- builds log / builds wait: say the user has no access to the log

Closes #1641

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/apify-cli@1642

commit: 63475e0

The API keeps an empty meta object on reduced builds, so the presence of
meta no longer tells them apart.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@HonzaKirchner
HonzaKirchner requested review from vdusek and removed request for vdusek November 25, 2026 08:15
HonzaKirchner and others added 4 commits November 26, 2026 14:22
The API keeps returning meta.origin on reduced builds, so only the missing
userId tells them apart. builds info prints the origin again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The final platform change keeps userId and meta.origin on reduced builds,
so infer a reduced build from the missing options instead. Also compute
the duration in builds info from the timestamps when stats are missing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Drop the builds wait change and shrink the test and comments to keep the diff small.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle reduced build data for users who can neither write to nor build the Actor

1 participant