Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Gracefully handle build artifacts that don't exist yet or have expired #17

Open
iandunn opened this issue Mar 10, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@iandunn
Copy link
Member

iandunn commented Mar 10, 2022

Trying to build a VM for a very new or very old PR often fails, because the build artifact doesn't exist.

That's a side-effect of fdb90ac.

As for errors, one of the downsides of the new implementation is it doesn’t yet handle very well if (a) a pull request is first opened and the build hasn’t finished yet or (b) the pull request is so old that GitHub’s artifact expiration purges the zip. Basically it’s assuming a very happy path in its current state.

At the very least, we can show a descriptive error message, so the user knows to: (a) try again in a few minutes; or (b) that it's not possible to build older PRs.

In the case of expired artifacts, maybe we could additionally kick off a process to renew new, or give the user instructions for renewing them. Or maybe in those cases we could bring back the code from fdb90ac. It was removed for performance reasons, but if it's only running in edge cases then it probably wouldn't be an issue. We can also just increase the host VM's CPU/RAM to handle any additional load.

@iandunn iandunn added the bug Something isn't working label Mar 10, 2022
@dd32
Copy link
Member

dd32 commented Mar 14, 2022

It seems that the builder throws a specific error for artifact-unavailable.

It looks like it throws Invalid pull request, you can see that by trying to boot up PR 2649, which throws INVALID rather than ERROR:

Screen Shot 2022-03-14 at 11 58 41 am

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants