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

Commits on Jul 29, 2024

  1. Make sure to wait before restarting the remote builder

    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`
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    c29c2de View commit details
    Browse the repository at this point in the history
  2. fixed a test

    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    1512d07 View commit details
    Browse the repository at this point in the history
  3. simplified WaitForAnyMachineState

    channels are better than that disgusting mutex garbage i was doing
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    6e12940 View commit details
    Browse the repository at this point in the history
  4. start waitedForStartOrStop to false

    silly testing bug
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    c8368e5 View commit details
    Browse the repository at this point in the history
  5. Change restartBuilder to return cleanly when already started

    Basically, if the builder is in the 'created' state for example, and we
    transition into 'started', there's no reason to start it.
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    4d205c9 View commit details
    Browse the repository at this point in the history
  6. don't return err = nil if we can't find the correct state

    that's dumb. instead we should just return a standard WaitTimeoutErr if
    we can't reach any state.
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    5862799 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    235662e View commit details
    Browse the repository at this point in the history
  8. cleanup code a bit

    switch statements are the future
    
    Co-authored-by: JP [email protected]
    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    c231251 View commit details
    Browse the repository at this point in the history
  9. fix tests

    billyb2 committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    ce89c34 View commit details
    Browse the repository at this point in the history