Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that I made a mistake when sending this PR.
cl/371172872 was correct, but when I sent this OSS PR, the change was already made in OSS (just a few lines below). Since the code change in this PR wasn't what I intended to make, we may just revert this PR.
On the other hand, different from cl/371172872. This OSS code had an extra
containerClusterAwaitRestingState
beforecontainerNodePoolAwaitRestingState
. I wonder if we would introduce a similar bug if we simply revert this PR-- when deleting a node pool, should we raise an error if the cluster doesn't exist, or should we just print a log? If it's the latter, then we may fix this log message.@rileykarson @ScottSuarez WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the cluster doesn't exist we can assume the node pool doesn't. It's not immediately obvious what's wrong here to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good. Maybe I shouldn't say "fix this log message". Since we assume the node pool doesn't exist because the cluster doesn't, we can improve this log message to
"[INFO] GKE cluster %s doesn't exist, skipping node pool %s deletion", nodePoolInfo.cluster, d.Id()
.It's not that critical, just the code wasn't doing what I thought it would do, and I think maybe it would be confusing to others as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, we could make it more clear! If you're interested in changing it feel free, but I don't feel it's required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do. Thanks