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

Fix apply --prune to visit cli specified namespace #85613

Conversation

MartinKaburu
Copy link
Contributor

@MartinKaburu MartinKaburu commented Nov 25, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
It fixes a bug that causes kubectl apply --prune -n <namespace> to fail since it does not check the cli specified namespace.

Which issue(s) this PR fixes:
Fixes #85357

Does this PR introduce a user-facing change?:

`kubectl apply  -f <file> --prune -n <namespace>` should prune all resources not defined in the file in the cli specified namespace.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 25, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @MartinKaburu. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 25, 2019
@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. release-note-none Denotes a PR that doesn't merit a release note. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 25, 2019
@neolit123
Copy link
Member

/ok-to-test
/priority backlog

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 26, 2019
@neolit123
Copy link
Member

Does this PR introduce a user-facing change?:
None

instead of "none" please explain the change in a single sentence (release note).

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Nov 26, 2019
@MartinKaburu
Copy link
Contributor Author

/test pull-kubernetes-verify

@MartinKaburu
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@MartinKaburu
Copy link
Contributor Author

/test pull-kubernetes-verify

1 similar comment
@MartinKaburu
Copy link
Contributor Author

/test pull-kubernetes-verify

@soltysh
Copy link
Contributor

soltysh commented Nov 27, 2019

Also that verify failure is legit, the gofmt is messed up.

@MartinKaburu MartinKaburu force-pushed the fix-apply-prune-to-visit-cli-specified-namespace branch from 79a85b6 to 20d0558 Compare December 3, 2019 14:12
@MartinKaburu MartinKaburu force-pushed the fix-apply-prune-to-visit-cli-specified-namespace branch 2 times, most recently from 0433c99 to f2cd4d2 Compare December 5, 2019 23:43
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold
for the rebase

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 9, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MartinKaburu, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 9, 2020
@MartinKaburu MartinKaburu force-pushed the fix-apply-prune-to-visit-cli-specified-namespace branch from f2cd4d2 to 396a1f9 Compare January 9, 2020 15:06
@k8s-ci-robot k8s-ci-robot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 9, 2020
@MartinKaburu MartinKaburu force-pushed the fix-apply-prune-to-visit-cli-specified-namespace branch from 0e7d21c to ecf5758 Compare January 9, 2020 15:11
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. labels Jan 9, 2020
@MartinKaburu MartinKaburu force-pushed the fix-apply-prune-to-visit-cli-specified-namespace branch from ecf5758 to f251834 Compare January 9, 2020 19:01
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 9, 2020
@MartinKaburu
Copy link
Contributor Author

/retest

@MartinKaburu
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2020
@soltysh
Copy link
Contributor

soltysh commented Jan 15, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 15, 2020
@MartinKaburu
Copy link
Contributor Author

/retest tide

@k8s-ci-robot k8s-ci-robot merged commit 0520931 into kubernetes:master Jan 15, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 15, 2020
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
…-to-visit-cli-specified-namespace

Fix apply --prune to visit cli specified namespace

Kubernetes-commit: 0520931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubectl --prune -n <namespace> doesn't visit the CLI-specified namespace.
4 participants