Repository navigation
fix(builds): handle reduced build data for users without write or build access - #1642
Open
HonzaKirchner wants to merge 6 commits into
Open
HonzaKirchner wants to merge 6 commits into
HonzaKirchner wants to merge 6 commits into
Conversation
…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>
commit: |
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>
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
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.
Closes #1641
The API now returns a reduced build (no
stats,optionsorusage, and a 404 for the log;userIdandmeta.originstay) 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 whenstatsis 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
optionsis treated as reduced (isReducedBuild).outputJobLognow returns'no-logs'when a finished job has no log.🤖 Generated with Claude Code