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

Validate plugins can be removed without local manifest #300

Merged
merged 3 commits into from
Jul 31, 2019

Conversation

ahmetb
Copy link
Member

@ahmetb ahmetb commented Jul 31, 2019

This validates the scenario that we can remove/rename plugins in the index
without breaking local user installations (since this is now possible with
the install receipts).

/assign @corneliusweig

This validates the scenario that we can remove/rename plugins in the index
without breaking local user installations (since this is now possible with
the install receipts).

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 31, 2019
@codecov-io
Copy link

codecov-io commented Jul 31, 2019

Codecov Report

Merging #300 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #300   +/-   ##
=======================================
  Coverage   55.66%   55.66%           
=======================================
  Files          19       19           
  Lines         918      918           
=======================================
  Hits          511      511           
  Misses        355      355           
  Partials       52       52

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 38672e5...6be6866. Read the comment docs.

Copy link
Contributor

@corneliusweig corneliusweig left a comment

Choose a reason for hiding this comment

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

Good idea to add this test-case.

integration_test/uninstall_test.go Outdated Show resolved Hide resolved
integration_test/uninstall_test.go Outdated Show resolved Hide resolved
integration_test/uninstall_test.go Outdated Show resolved Hide resolved
defer cleanup()

test = test.WithIndex()
localManifest := filepath.Join(test.Root(), "index", "plugins", validPlugin+constants.ManifestExtension)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit unhappy that we depend on the implementation detail of where the manifest is stored. It would be cleaner to use environment.Paths here. Maybe it's time to refactor the environment package, so that it can be used without setting up env variables.

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly I agree, but we'd immediately know when we change the paths because the test would start breaking.

Copy link
Member Author

Choose a reason for hiding this comment

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

That said I think we can expose NewPaths() here that doesn't rely on environment variables, for testing or other purposes:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's do that in another PR and close this one. I think there are more locations which can be made simpler.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@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 Jul 31, 2019
@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

@k8s-ci-robot k8s-ci-robot merged commit 8d148b5 into kubernetes-sigs:master Jul 31, 2019
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants