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

Unify downloaders, add GitHub and Alibaba ISO fallbacks #6892

Merged
merged 10 commits into from
Mar 5, 2020

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Mar 5, 2020

This refactors our downloads to use a single library, making it easier to address #6692

  • Removes util.ISODownloader class
  • Removes Downloader from config.ClusterConfig
  • Removes last usage of deprecated go-downloader library (binaries)
  • Fixes preload.TarBallExists: local cache was not consulted, and HTTP status codes were not respected.
  • Clarifies confusing preload logic in node/start.go
  • Adds GitHub and Alibaba (China) as fallbacks for ISO downloads, fixing Allow ISO's to be downloaded from GitHub #4774

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

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 Mar 5, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 5, 2020
@tstromberg
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 5, 2020
@tstromberg tstromberg changed the title Add download package & support URL fallback Add download package & support ISO URL fallback Mar 5, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@tstromberg tstromberg changed the title Add download package & support ISO URL fallback Refactor downloaders to use a single package, add ISO URL fallback Mar 5, 2020
@tstromberg tstromberg changed the title Refactor downloaders to use a single package, add ISO URL fallback Refactor downloaders to use the same library, add ISO fallback Mar 5, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@codecov-io
Copy link

Codecov Report

Merging #6892 into master will decrease coverage by 0.83%.
The diff coverage is 17.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6892      +/-   ##
==========================================
- Coverage   38.14%   37.31%   -0.84%     
==========================================
  Files         142      144       +2     
  Lines        8789     8866      +77     
==========================================
- Hits         3353     3308      -45     
- Misses       5015     5144     +129     
+ Partials      421      414       -7
Impacted Files Coverage Δ
pkg/minikube/download/progressbar.go 100% <ø> (ø)
pkg/minikube/download/preload.go 0% <0%> (ø)
pkg/minikube/download/iso.go 0% <0%> (ø)
pkg/minikube/bootstrapper/bsutil/binaries.go 5.4% <0%> (ø) ⬆️
pkg/minikube/download/driver.go 0% <0%> (ø)
pkg/minikube/driver/install.go 9.33% <0%> (+1.64%) ⬆️
pkg/minikube/machine/cache_binaries.go 100% <100%> (+12.5%) ⬆️
cmd/minikube/cmd/start.go 32.35% <16.66%> (-0.27%) ⬇️
pkg/minikube/download/binary.go 77.41% <77.41%> (ø)
... and 3 more

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 5, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 5, 2020
@minikube-pr-bot
Copy link

All Times Minikube (PR 6892): [ 90.475357 92.698243 92.338295]
All Times minikube: [ 91.560541 91.040170 91.565544]

Average minikube: 91.388751
Average Minikube (PR 6892): 91.837298

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6892) |
+----------------------+-----------+--------------------+
| minikube v           |  0.329887 |           0.314768 |
| Creating kvm2        | 20.257134 |          19.869784 |
| Preparing Kubernetes | 49.320086 |          49.218473 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.241002 |          21.047735 |
| Waiting for cluster  |  0.048055 |           0.060281 |
+----------------------+-----------+--------------------+

Copy link

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

Nice this is way more organized! LGTM

@tstromberg tstromberg changed the title Refactor downloaders to use the same library, add ISO fallback Unify downloaders, add GitHub and Alibaba ISO fallbacks Mar 5, 2020
@minikube-pr-bot
Copy link

All Times minikube: [ 93.908826 93.636170 89.566169]
All Times Minikube (PR 6892): [ 92.426011 90.310757 93.447311]

Average Minikube (PR 6892): 92.061360
Average minikube: 92.370388

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6892) |
+----------------------+-----------+--------------------+
| minikube v           |  0.212238 |           0.343741 |
| Creating kvm2        | 20.222447 |          19.687417 |
| Preparing Kubernetes | 49.491585 |          51.017184 |
| Pulling images       |           |                    |
| Launching Kubernetes | 20.962446 |          19.619611 |
| Waiting for cluster  |  0.052669 |           0.064527 |
+----------------------+-----------+--------------------+

@medyagh medyagh merged commit d96edd4 into kubernetes:master Mar 5, 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants