Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

add shoot target check when target.Stack() length >= 3 #198

Merged

Conversation

neo-liang-sap
Copy link
Contributor

@neo-liang-sap neo-liang-sap commented May 19, 2020

What this PR does / why we need it:

Sometimes ago we only have garden / seed / project / shoot in kinds of target, so when len(target.Stack())>=3, there must be one shoot targeted.
Now there's one new kind of namespace in kinds of target, so when len(target.Stack())>=3 , shoot might not be targeted, which might causing some command fail (e.g. gardenctl az related commands)

Which issue(s) this PR fixes:

Fixes #196

Special notes for your reviewer:

This error was found in executing gardenctl az but also found across the whole project, so refactor them all together

Release note:

Fixes gardenctl related error in certain kind of scenario when gardenctl not targeting shoot

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 19, 2020
@neo-liang-sap neo-liang-sap changed the title add shoot target check when target.Stack() length > 3 [WIP] add shoot target check when target.Stack() length > 3 May 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 19, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 19, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 19, 2020
@neo-liang-sap neo-liang-sap changed the title [WIP] add shoot target check when target.Stack() length > 3 add shoot target check when target.Stack() length >= 3 May 19, 2020
Copy link
Contributor

@DockToFuture DockToFuture left a comment

Choose a reason for hiding this comment

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

/lgtm

@ghost ghost added the reviewed/lgtm Has approval for merging label May 19, 2020
@DockToFuture DockToFuture merged commit 67abac8 into gardener-attic:master May 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve the error message when running gardenctl az network vnet delete while not targeting the shoot
5 participants