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

gcp: allow for deprecating and then attaching to image family #1444

Merged
merged 5 commits into from
May 15, 2020

Commits on May 15, 2020

  1. mantle/ore: gcloud: fix --image arg for deprecate-image

    This was passing through the toplevel opts.Image processing
    before and it was creating a URL for the image rather than
    just the string passed by the user. Override it here.
    dustymabe committed May 15, 2020
    Configuration menu
    Copy the full SHA
    c71e358 View commit details
    Browse the repository at this point in the history
  2. mantle: switch to v0.alpha for gcloud compute API

    This is prep for some future work where we need the images.patch
    API call. That API call is currently only in the alpha API.
    
    Note: ran `go mod vendor` to pick up the alpha API files.
    dustymabe committed May 15, 2020
    Configuration menu
    Copy the full SHA
    df76697 View commit details
    Browse the repository at this point in the history
  3. mantle/ore: add ore gcloud update-image

    This new command will take advantage of the new Alpha compute API
    call to image.patch that will allow us to update the image family
    for an image after it has been created. The image.patch API call
    also allows for updating the description (which we also allow here)
    and the deprecation state (which we leave to the deprecate-image
    command).
    dustymabe committed May 15, 2020
    Configuration menu
    Copy the full SHA
    46c2fdf View commit details
    Browse the repository at this point in the history
  4. cosalib/gcp: attach to image family in separate API call

    Currently we create an image and attach it to an image family in a
    single API call. We'd like to attach it to an image family *after*
    the image has been deprecated (deprecated images won't be given
    to users who are trying to retrieve the latest image for an image
    family). However, you can't create an image AND deprecate it in
    the same API call so there is a split second of opportunity for
    a user to get the newer GCP image before we've officially released
    it.
    
    This change breaks it up so that we can:
    
    1. create the image (not part of a image family)
    2. deprecate the image
    3. attach the image to an image family
    
    The new flow means there is no opportunity for a user to get an
    image that has yet to be released.
    dustymabe committed May 15, 2020
    Configuration menu
    Copy the full SHA
    aee12f2 View commit details
    Browse the repository at this point in the history
  5. mantle/ore: gcloud: fix error detection for deprecate-image

    Previously we weren't checking the error from "pending". Let's
    do that now because we can miss actual errors from the gcloud API
    otherwise.
    dustymabe committed May 15, 2020
    Configuration menu
    Copy the full SHA
    d0e6380 View commit details
    Browse the repository at this point in the history