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

Deduplicate list of directories #69089

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Sep 26, 2018

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes kubernetes/kubectl#539

/assign @juanvallejo

Btw. we should add some tests for plugin command.

Release note:

Deduplicate PATH items when reading plugins.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 26, 2018
@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 26, 2018
@soltysh
Copy link
Contributor Author

soltysh commented Sep 26, 2018

/kind bug

@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 Sep 26, 2018
@soltysh
Copy link
Contributor Author

soltysh commented Sep 26, 2018

/retest

@@ -227,3 +228,15 @@ func isExecutable(fullPath string) (bool, error) {

return false, nil
}

func unique(items []string) []string {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could alternatively use the "sets" package from apimachinery: "k8s.io/apimachinery/pkg/util/sets.NewString"

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 27, 2018
@soltysh
Copy link
Contributor Author

soltysh commented Sep 27, 2018

@juanvallejo good point, updated. PTAL

@juanvallejo
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juanvallejo, 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 merged commit 2588ad5 into kubernetes:master Sep 27, 2018
@ahmetb
Copy link
Member

ahmetb commented Sep 27, 2018

Should this be cherry-picked into 1.12?

@juanvallejo
Copy link
Contributor

Should this be cherry-picked into 1.12?

Yes, this should be part of the 1.12 release

@ahmetb
Copy link
Member

ahmetb commented Sep 27, 2018

Please add the cherrypick-candidate label.

@soltysh
Copy link
Contributor Author

soltysh commented Sep 28, 2018

Please add the cherrypick-candidate label.

It was removed since nobody used it. Only cherrypick-approved is useful on backport PRs.

@soltysh soltysh deleted the kubectl_issue539 branch September 28, 2018 10:17
@ahmetb
Copy link
Member

ahmetb commented Sep 28, 2018

I see. So potentially this is delayed until 1.13 or it could go out in a patch release for 1.12?

@soltysh
Copy link
Contributor Author

soltysh commented Oct 8, 2018

#69170 was a 1.12 cherry-pick, so watch out for release patch.

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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Plugin] [1.12] plugin binaries are overshadowed by themselves if they appear in PATH twice
4 participants