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

plugin/google: several improvements related to resource management #2005

Merged
merged 6 commits into from
Aug 9, 2021

Conversation

krantzinator
Copy link
Contributor

@krantzinator krantzinator commented Aug 6, 2021

This is kind of a lot but they were all interconnected so I figured it was still small enough to include in one PR, as change requests for one part may affect other parts here anyway.

Things done:

(note: there is still a bug with deployment destroys, see #2002; because of that, the first example below requires running waypoint up between destroy attempts in order to accurately see the errors.)
Before changes:

$ waypoint deployment destroy -all

» 1 deployments will be destroyed.
  Destroying deployment: 01FCEJ15WCCFCTV19G1WXAS42N
! Error destroying the deployment: rpc error: code = Unknown desc = googleapi: Error 400: Revision "example-python-dw8lp" cannot be directly deleted because it is actively serving.,
failedPrecondition

$ waypoint destroy -auto-approve

» Destroying releases for application 'example-python'...

» Destroying deployments for application 'example-python'...
! Error destroying: rpc error: code = Unknown desc = googleapi: Error 400: Revision "example-python-nlmzx" cannot be directly deleted because it is actively serving.,
failedPrecondition

After changes:

$ waypoint deployment destroy -all

» 2 deployments will be destroyed.
  Destroying deployment: 01FCEHET53H4SEE7AA080SD3MV
namespaces/rae-waypoint-test-003/revisions/example-python-r7tmw
⚠️ Cannot destroy deployment with revision "namespaces/rae-waypoint-test-003/revisions/example-python-r7tmw", as revision is actively receiving traffic.
  Destroying deployment: 01FCEH7B80HPB4RTVP2RZEQDMW
namespaces/rae-waypoint-test-003/revisions/example-python-fr2tr

$ waypoint destroy -auto-approve

» Destroying releases for application 'example-python'...

» Destroying shared deploy resources for application 'example-python'...
namespaces/rae-waypoint-test-003/services/example-python

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment/suggestion, otherwise 👍

builtin/google/cloudrun/platform.go Show resolved Hide resolved
Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! ✨

@krantzinator krantzinator merged commit 486e087 into main Aug 9, 2021
@krantzinator krantzinator deleted the google-resource-manager branch August 9, 2021 17:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants