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

Projects
None yet
4 participants
@ahmetb
Copy link
Contributor

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

pkg/installation: reorder receipt save & install()
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.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@codecov-io

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

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?

pkg/installation: reorder receipt saving in uninstall()
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@ahmetb

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

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

Done. PTAL.

@corneliusweig

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Jul 2, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link

commented Jul 2, 2019

[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

2 of 3 checks passed

tide Not mergeable.
Details
cla/linuxfoundation ahmetb authorized
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.