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 dry-run output in kubectl apply --prune #69344

Merged

Conversation

zegl
Copy link
Contributor

@zegl zegl commented Oct 2, 2018

What this PR does / why we need it:

Makes dry-run output match what would happen when running in non dry-run mode.

Objects would only get added to visitedUids if running in non dry-run mode.

visitedUids is used by prune() to know if an action should be taked on the item or not.

Which issue(s) this PR fixes :

Fixes #67863

Special notes for your reviewer:

Release note:

Fix dry-run output in kubectl apply --prune

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 2, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 2, 2018
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 2, 2018
@wgliang
Copy link
Contributor

wgliang commented Oct 2, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 2, 2018
@zegl zegl force-pushed the improve-kubectl-apply-prune-output branch from c7a620b to 2685967 Compare October 3, 2018 07:54
@zegl
Copy link
Contributor Author

zegl commented Oct 3, 2018

/retest

@zegl zegl changed the title Fix prune output in kubectl apply --prune Fix dry-run output in kubectl apply --prune Oct 3, 2018
@zegl zegl force-pushed the improve-kubectl-apply-prune-output branch from 2685967 to 1cf8830 Compare October 3, 2018 14:33
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 3, 2018
@zegl zegl force-pushed the improve-kubectl-apply-prune-output branch from 1cf8830 to 5c8ef1c Compare October 3, 2018 14:33
@zegl
Copy link
Contributor Author

zegl commented Oct 3, 2018

/retest

1 similar comment
@zegl
Copy link
Contributor Author

zegl commented Oct 3, 2018

/retest

@zegl
Copy link
Contributor Author

zegl commented Oct 3, 2018

/test pull-kubernetes-integration

@zegl
Copy link
Contributor Author

zegl commented Oct 3, 2018

/test pull-kubernetes-e2e-gce-100-performance

@zegl
Copy link
Contributor Author

zegl commented Oct 4, 2018

Rebased to resolve conflicts (in apply_test.go).

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2018
@zegl zegl force-pushed the improve-kubectl-apply-prune-output branch from c468737 to 8193059 Compare October 7, 2018 09:40
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 7, 2018
@zegl
Copy link
Contributor Author

zegl commented Oct 24, 2018

What do I have to do to get this reviewed?

@nikhita
Copy link
Member

nikhita commented Nov 5, 2018

@zegl sorry that it's taking time to get this reviewed!

/kind bug
/assign @juanvallejo @soltysh

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Nov 5, 2018
@juanvallejo
Copy link
Contributor

cc @apelisse

Makes dry-run output match what would happen when running in non dry-run mode.

Objects would only get added to visitedUids if running in non dry-run mode.

visitedUids is used by prune() to know if an action should be taked on the item or not.

Fixes kubernetes#67863
The fake webclient should return one ConfigMap per request, not the whole ConfigMapList

Also added additional tests to the output
@zegl zegl force-pushed the improve-kubectl-apply-prune-output branch from 8193059 to 37c253a Compare November 11, 2018 14:20
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Nov 11, 2018
@apelisse
Copy link
Member

Thank you!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 11, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, zegl

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2018
@soltysh
Copy link
Contributor

soltysh commented Nov 13, 2018

/milestone v1.13

@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Nov 13, 2018
@k8s-ci-robot k8s-ci-robot merged commit 54243e1 into kubernetes:master Nov 14, 2018
@zegl zegl deleted the improve-kubectl-apply-prune-output branch November 14, 2018 15:20
johanot pushed a commit to DBCDK/kubernixos that referenced this pull request Nov 15, 2018
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. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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 --dry-run produces incorrect output
7 participants