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

Show new/updated plugins list after index updates #593

Merged
merged 2 commits into from
Apr 23, 2020

Conversation

ahmetb
Copy link
Member

@ahmetb ahmetb commented Apr 16, 2020

  • Adjusted the showUpdatedPlugins logic to behave well with multi-index mode
  • Adjusted the "Updated the local copy of plugin index" message for multi-index
    mode. (We won't show index name if it's 'default' index.)

Related issue: #566
/area multi-index
/assign @corneliusweig
/assign @chriskim06

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 16, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/multi-index labels Apr 16, 2020
@chriskim06 chriskim06 mentioned this pull request Apr 16, 2020
22 tasks
* Adjusted the showUpdatedPlugins logic to behave well with multi-index mode
* Adjusted the "Updated the local copy of plugin index" message for multi-index
  mode. (We won't show index name if it's 'default' index.)

Signed-off-by: Ahmet Alp Balkan <[email protected]>
@chriskim06
Copy link
Member

Thanks for taking care of this! It LGTM, do you think it would be worth modifying this integration test to check for upgrade available for plugins from custom indexes or is that not needed?

@ahmetb
Copy link
Member Author

ahmetb commented Apr 16, 2020

Yeah, I got lazy about tests. I will try to update.

cmd/krew/cmd/update.go Show resolved Hide resolved
@corneliusweig
Copy link
Contributor

/lgtm
/approve
/hold
In case you want to follow up in a different PR.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 18, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 18, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 19, 2020
@ahmetb
Copy link
Member Author

ahmetb commented Apr 19, 2020

nit: this message is shown even if the EnusreUpdated() call failed with an error.

So I fixed this bug and pushed a change. But I'm not touching the tests. That's mostly because I noticed we'd duplicate a lot of test code (as adding custom indexes takes a lot of code right now).

Ideally we need an utility like:

NewTest(t).WithDefaultIndex().WithDefaultIndexMirroredAs("foo").WithCustomIndex(name, src). ...

but since there's a feature gate around the multi-index features, I'm refraining from developing this pattern.

@corneliusweig
Copy link
Contributor

/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 Apr 23, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, corneliusweig

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:
  • OWNERS [ahmetb,corneliusweig]

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

@corneliusweig
Copy link
Contributor

/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 Apr 23, 2020
@k8s-ci-robot k8s-ci-robot merged commit 045262e into kubernetes-sigs:master Apr 23, 2020
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/multi-index cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants