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
gha: delete azure RG only if it exists #9007
Conversation
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.
LGTM, thank you Wainer! Left a couple nits but happy to merge as is. 🙂
tests/gha-run-k8s-common.sh
Outdated
local rg | ||
rg="$(_print_rg_name ${test_type})" | ||
|
||
if [ "$(az group exists -n "${rg}")" == "true" ]; then |
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 [ "$(az group exists -n "${rg}")" == "true" ]; then | |
if [ "$(az group exists -g "${rg}")" == "true" ]; then |
If we want to be consistent with other commands.
tests/gha-run-k8s-common.sh
Outdated
az group delete \ | ||
-g "${rg}" \ | ||
--yes |
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.
az group delete \ | |
-g "${rg}" \ | |
--yes | |
az group delete -g "${rg}" --yes |
Tiny bit more readable.
delete_cluster() has tried to delete the az resources group regardless if it exists. In some cases the result of that operation is ignored, i.e., fail to resource group not found, but the log messages get a little dirty. Let's delete the RG only if it exists then. Fixes kata-containers#8989 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
8c92832
to
a04b215
Compare
Just updated to address @sprt 's suggestions. |
/test |
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.
Lgtm, thanks!
delete_cluster() has tried to delete the az resources group regardless if it exists. In some cases the result of that operation is ignored, i.e., fail to resource group not found, but the log messages get a little dirty. Let's delete the RG only if it exists then.
Fixes #8989
Signed-off-by: Wainer dos Santos Moschetta wainersm@redhat.com
Split of #8990