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

Simpler migration without external dependency #511

Merged
merged 3 commits into from
Feb 24, 2020

Conversation

corneliusweig
Copy link
Contributor

This migrates the krew home to the new layout without an external dependency.
Related issue: #505

Also see #505 (comment)

cc @chriskim06

Git-clone means an external dependency which is hard to test. This
ensures that the migration can be done locally without calling a remote
repository. Thus, the migration can also be tested.
@k8s-ci-robot k8s-ci-robot added 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2020
@codecov-io
Copy link

codecov-io commented Feb 22, 2020

Codecov Report

Merging #511 into master will increase coverage by 1.44%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage   57.42%   58.87%   +1.44%     
==========================================
  Files          23       23              
  Lines         996      997       +1     
==========================================
+ Hits          572      587      +15     
+ Misses        368      350      -18     
- Partials       56       60       +4
Impacted Files Coverage Δ
internal/indexmigration/migration.go 65.21% <40%> (+65.21%) ⬆️

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 e662ea4...7c00b39. Read the comment docs.

@@ -48,15 +44,22 @@ func Migrate(paths environment.Paths) error {
klog.V(2).Infoln("Already migrated")
return nil
}
indexPath := paths.IndexPath()
tmpPath := filepath.Join(paths.BasePath(), "tmp_index_migration")
Copy link
Member

Choose a reason for hiding this comment

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

this wouldn't be better as os.TempDir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TempDir would be safer of course, but I wanted to avoid moving across file systems.

@ahmetb
Copy link
Member

ahmetb commented Feb 24, 2020

/lgtm
/approve
/hold
just a question.

@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 Feb 24, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 24, 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 Author

/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 Feb 24, 2020
@k8s-ci-robot k8s-ci-robot merged commit 18eafeb into kubernetes-sigs:master Feb 24, 2020
@corneliusweig corneliusweig deleted the w/migration branch February 24, 2020 22:56
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.

4 participants