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 upgrade if a plugin installed from manifest #458

Merged
merged 2 commits into from
Jan 9, 2020

Conversation

ferhatelmas
Copy link
Contributor

If a plugin isn't in index, upgrade for all doesn't fail anymore.
Also, added an integration test by modifying valid plugin konfig to konfig-non-index.

Related to #454 problem 1.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 4, 2020
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 4, 2020
@codecov-io
Copy link

codecov-io commented Jan 4, 2020

Codecov Report

Merging #458 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #458      +/-   ##
==========================================
+ Coverage   56.47%   56.52%   +0.04%     
==========================================
  Files          19       19              
  Lines         926      927       +1     
==========================================
+ Hits          523      524       +1     
  Misses        350      350              
  Partials       53       53
Impacted Files Coverage Δ
cmd/validate-krew-manifest/main.go 54.54% <0%> (+0.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f92c9d7...a554426. Read the comment docs.

validPlugin2 = "mtail" // a plugin in central index with small size
validPlugin = "konfig" // a plugin in central index with small size
validPlugin2 = "mtail" // a plugin in central index with small size
validNonIndexPlugin = "konfig-non-index" // a plugin not in central index with small size
Copy link
Member

Choose a reason for hiding this comment

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

instead of doing this let's do this:

  1. test.WithIndex()
  2. find konfig.yaml in the index path, delete it
  3. use upgrade --no-update-index in both install and upgrade calls in the integration test.

this way:

  • you can fake the situation that konfig is not in the index.
  • without having to duplicate a testdata file (I really dislike increasing testdata)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds much better, updated.

@corneliusweig
Copy link
Contributor

/lgtm
/approve
..and sorry for this 🐌 response

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jan 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit d3103f3 into kubernetes-sigs:master Jan 9, 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. 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.

None yet

5 participants