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

Make sure to wait before restarting the remote builder #3785

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

billyb2
Copy link
Contributor

@billyb2 billyb2 commented Jul 26, 2024

Change Summary

What and Why:

If the remote builder is in the 'created' or 'migrating' state, then we won't be able to restart it. By making sure to wait for one of those two states, we can avoid errors like:

failed to fetch an image or build from source: failed to restart VM asfijsdoif: failed_precondition: unable to restart machine, not currently started or stopped

How:
make sure that the builder machine is either in the started or stopped state before calling the 'restart' API

Related to:


Documentation

  • Fresh Produce (i'm gonna fix a few more remote builder issues before FP)
  • In superfly/docs, or asked for help from docs team
  • n/a

If the remote builder is in the 'created' or 'migrating' state, then we
won't be able to restart it. By making sure to wait for one of those two
states, we can avoid errors like:

`failed to fetch an image or build from source: failed to restart VM asfijsdoif: failed_precondition: unable to restart machine, not currently started or stopped`
channels are better than that disgusting mutex garbage i was doing
Basically, if the builder is in the 'created' state for example, and we
transition into 'started', there's no reason to start it.
that's dumb. instead we should just return a standard WaitTimeoutErr if
we can't reach any state.
switch statements are the future

Co-authored-by: JP [email protected]
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.

2 participants