ci: add wait before adding windows nodepool if cluster is in updating state #3065
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.
Reason for Change:
If a windows nodepool is added to a newly created aks cluster, the aks cluster may be in "Updating" state, causing the job to fail. This PR adds a check to see if the cluster is in updating state and sleeps until the cluster is no longer in the updating state. Also refactors adding windows nodepool into a common template and adds a check if the windows nodepool is already created (so we don't error if the nodepool is already added).
Issue Fixed:
Requirements:
Notes:
On detecting updating state, we wait, see line 54:
https://msazure.visualstudio.com/One/_build/results?buildId=105433502&view=logs&j=66af8358-44a8-5a80-90ff-77e03c31665a&t=8f8dc4ee-a8ef-5fc9-ab65-cc330785c488
When not detecting updating state, we proceed:
https://msazure.visualstudio.com/One/_build/results?buildId=105437613&view=logs&s=46b305b8-7ec3-51e0-83b8-e4b201974b98&j=66af8358-44a8-5a80-90ff-77e03c31665a