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

pkg/installation: reorder receipt save & install() #237

Merged
merged 2 commits into from
Jul 2, 2019

Conversation

ahmetb
Copy link
Member

@ahmetb ahmetb commented Jul 2, 2019

Looks like we didn't address the code review comment at
#195 (comment).

Copying the conversation from there:

This is better because:

  • actually installing a plugin (extract files, symlink binary) but then failing
    to store the receipt is okay (at most you'd be leaking some files)
  • claiming the plugin is installed (i.e. receipt exists) while it's not
    installed is not okay.
  • tens of things can go wrong in install(), much fewer things can go wrong
    in receipt.Store(), so makes sense to do it last.

/assign @corneliusweig
/kind cleanup

Looks like we didn't address the code review comment at
kubernetes-sigs#195 (comment).

Copying the conversation from there:

> This is better because:
>
> - actually installing a plugin (extract files, symlink binary) but then failing
>   to store the receipt is okay (at most you'd be leaking some files)
> - claiming the plugin is installed (i.e. receipt exists) while it's not
>   installed is not okay.
> - tens of things can go wrong in `install()`, much fewer things can go wrong
>  in `receipt.Store()`, so makes sense to do it last.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 2, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 2, 2019
@codecov-io
Copy link

codecov-io commented Jul 2, 2019

Codecov Report

Merging #237 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #237   +/-   ##
======================================
  Coverage    53.6%   53.6%           
======================================
  Files          16      16           
  Lines         735     735           
======================================
  Hits          394     394           
  Misses        289     289           
  Partials       52      52
Impacted Files Coverage Δ
pkg/installation/install.go 32% <0%> (ø) ⬆️

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 1831b1b...4b8f011. Read the comment docs.

@corneliusweig
Copy link
Contributor

Woops, sorry. Looks like I was reordering the uninstall procedure instead of the install procedure (7e7cf0b). Do you want to swap the uninstall order back to original?

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@ahmetb
Copy link
Member Author

ahmetb commented Jul 2, 2019

Do you want to swap the uninstall order back to original?

Done. PTAL.

@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 2, 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 97158bc into kubernetes-sigs:master Jul 2, 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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