Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unexpected build status: PREPARED error #801

Merged
merged 2 commits into from Aug 24, 2023

Conversation

ghengeveld
Copy link
Member

Previously, the CLI could crash if the waitForBuild polling happened to return a build while it was PUBLISHED or PREPARED. These would be considered "complete" (not in progress) but the code that runs after the build is complete (rightfully) does not handle those build statuses.

I could've updated the status check to take PUBLISHED and PREPARED into account but it seems more resilient to look at completedAt instead.

@ghengeveld ghengeveld changed the title Use completedAt to know when build has completed, rather than status !== IN_PROGRESS Fix "Unexpected build status: PREPARED" Aug 23, 2023
@ghengeveld ghengeveld changed the title Fix "Unexpected build status: PREPARED" Fix Unexpected build status: PREPARED error Aug 23, 2023
Copy link
Contributor

@yannbf yannbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as long as there are no gotchas with using completedAt as a check (for instance, a build could be completed but be in a broken state maybe)

@ghengeveld
Copy link
Member Author

LGTM, as long as there are no gotchas with using completedAt as a check (for instance, a build could be completed but be in a broken state maybe)

Broken, failed and cancelled builds are already handled as valid completed builds.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghengeveld ghengeveld merged commit 0ef41ab into main Aug 24, 2023
22 checks passed
@ghengeveld ghengeveld deleted the fix-wait-for-completed-build branch August 24, 2023 15:02
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.

None yet

3 participants