Skip to content
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

Refactor/global target flags #196

Merged

Conversation

sven-petersen
Copy link
Contributor

@sven-petersen sven-petersen commented Dec 8, 2022

What this PR does / why we need it:

Instead of registering the target flags (--garden, --shoot, ...) on the root cmd they are now registered per command. This way the flags are only available where they have an effect.

Which issue(s) this PR fixes:
Fixes #85 (2nd step)

Special notes for your reviewer:

follow up: #195

Release note:

Register target-flags only on cmds that require them instead of globally

@sven-petersen sven-petersen requested a review from a team as a code owner December 8, 2022 09:51
@gardener-robot
Copy link

@sven-petersen Thank you for your contribution.

@gardener-robot gardener-robot added needs/review Needs review size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Dec 8, 2022
@gardener-robot-ci-1
Copy link
Contributor

Thank you @sven-petersen for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

@sven-petersen sven-petersen force-pushed the refactor/global-target-flags branch from cf836e8 to 21ff854 Compare December 8, 2022 09:53
pkg/cmd/env/env.go Outdated Show resolved Hide resolved
pkg/flags/export_test.go Outdated Show resolved Hide resolved
pkg/flags/flags_suite_test.go Outdated Show resolved Hide resolved
pkg/flags/target.go Outdated Show resolved Hide resolved
pkg/flags/target_test.go Outdated Show resolved Hide resolved
pkg/target/manager.go Outdated Show resolved Hide resolved
pkg/target/manager.go Outdated Show resolved Hide resolved
pkg/target/manager.go Outdated Show resolved Hide resolved
pkg/target/manager.go Show resolved Hide resolved
pkg/target/manager_test.go Outdated Show resolved Hide resolved
@sven-petersen sven-petersen force-pushed the refactor/global-target-flags branch from 537eef0 to c4fb334 Compare December 9, 2022 10:36
@gardener-robot gardener-robot added the needs/rebase Needs git rebase label Dec 9, 2022
@gardener-robot
Copy link

@sven-petersen You need rebase this pull request with latest master branch. Please check.

Copy link
Member

@petersutter petersutter left a comment

Choose a reason for hiding this comment

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

/lgtm (but requires rebase)

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/rebase Needs git rebase needs/review Needs review needs/second-opinion Needs second review by someone else labels Dec 9, 2022
pkg/flags/target.go Outdated Show resolved Hide resolved
Copy link
Member

@holgerkoser holgerkoser left a comment

Choose a reason for hiding this comment

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

/lgtm
Don't forget to rebase

@sven-petersen sven-petersen force-pushed the refactor/global-target-flags branch from c4fb334 to 2e2007b Compare December 12, 2022 11:47
@gardener-robot gardener-robot added needs/second-opinion Needs second review by someone else and removed reviewed/lgtm Has approval for merging labels Dec 12, 2022
@sven-petersen sven-petersen force-pushed the refactor/global-target-flags branch from 2e2007b to 1c40a21 Compare December 12, 2022 11:50
@holgerkoser holgerkoser 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 Dec 12, 2022
@gardener-robot-ci-2 gardener-robot-ci-2 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 Dec 12, 2022
@holgerkoser holgerkoser 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 Dec 12, 2022
@gardener-robot-ci-2 gardener-robot-ci-2 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 Dec 12, 2022
@holgerkoser holgerkoser 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 Dec 12, 2022
@gardener-robot-ci-2 gardener-robot-ci-2 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 Dec 12, 2022
@holgerkoser holgerkoser 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 Dec 12, 2022
@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 Dec 12, 2022
@holgerkoser holgerkoser 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 Dec 12, 2022
@gardener-robot-ci-2 gardener-robot-ci-2 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 Dec 12, 2022
@sven-petersen sven-petersen force-pushed the refactor/global-target-flags branch from 7315c7f to 19c104b Compare December 12, 2022 15:13
@holgerkoser holgerkoser 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 Dec 12, 2022
@gardener-robot-ci-2 gardener-robot-ci-2 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 Dec 12, 2022
@holgerkoser holgerkoser merged commit 7d03afd into gardener:master Dec 12, 2022
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Dec 12, 2022
@sven-petersen sven-petersen deleted the refactor/global-target-flags branch December 21, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce subcommands for gardenctl target
6 participants