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

fix logic covering both garden+seed+shoot and garden+project+shoot #296

Merged

Conversation

neo-liang-sap
Copy link
Contributor

What this PR does / why we need it:
current operate.go only covers scenario when target stack is garden+project+shoot, should also cover scenario garden+seed+shoot
Which issue(s) this PR fixes:
Fixes #295

Special notes for your reviewer:
/CC @Kristian-ZH
Release note:

Fix operate.go missing coverage on scenario garden+seed+shoot

@neo-liang-sap neo-liang-sap requested a review from a team as a code owner September 2, 2020 01:59
@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 Sep 2, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added 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 Sep 2, 2020
@neo-liang-sap
Copy link
Contributor Author

the test covers following flow:

  1. gardenctl target -g xxx -s xxx -t xxx (garden target is garden+seed+shoot), then gardenctl aws ec2 xxx works fine
  2. gardenctl target -g xxx -p xxx -t xxx (garden target is garden+project+shoot), then gardenctl aws ec2 xxx works fine

@Kristian-ZH i hope i'm understanding correctly on your issue, do let me know if i missed anything, thanks!

@Kristian-ZH
Copy link
Contributor

Yup, this will resolve the issue.

Thanks!

Copy link
Contributor

@Kristian-ZH Kristian-ZH left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added the reviewed/lgtm Has approval for merging label Sep 2, 2020
@neo-liang-sap neo-liang-sap merged commit 2cf6a20 into gardener-attic:master Sep 2, 2020
checkError(err)
var filteredShoots []gardencorev1beta1.Shoot
for _, s := range shootList.Items {
if s.Name == target.Stack()[2].Name {
Copy link
Contributor

Choose a reason for hiding this comment

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

@neo-liang-sap sorry for beeing late for the review, but here you are missing the check for the seed. Do not add to filteredShoots if the seed does not match the one on the target stack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks! i added a new PR for this here

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.

gardenctl aws|gcp... rely that project will be targeted
6 participants