Skip to content

Make sure to wait before restarting the remote builder #3785

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

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

billyb2 added 5 commits July 29, 2024 08:58
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.
@billyb2 billyb2 force-pushed the wait_before_start_builder branch from 37f42e5 to 4d205c9 Compare July 29, 2024 13:10
billyb2 added 4 commits July 29, 2024 09:26
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]
@billyb2 billyb2 force-pushed the wait_before_start_builder branch from c998198 to ce89c34 Compare July 29, 2024 18:29
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