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

Use all kops mirrors to determine artifacts hashes #9958

Merged
merged 2 commits into from
Sep 18, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Sep 17, 2020

Current implementation only looks for hash files in the S3 mirror and, if that is down, kops commands will fail with:

cannot determine hash for "https://kubeupv2.s3.amazonaws.com/kops/1.19.0-alpha.4/linux/amd64/nodeup"
(have you specified a valid file location?)

The code in the assets remapping and mirroring is quite complex and even if this looks a bit less elegant than I would like, it works pretty well.

Fixes: #9951

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 17, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 Sep 17, 2020
@hakman
Copy link
Member Author

hakman commented Sep 17, 2020

/cc @justinsb @mikesplain @rifelpet @zetaab
/hold for comments

@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 Sep 17, 2020
Copy link
Member

@zetaab zetaab left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2020
@rifelpet
Copy link
Member

This new logic and the constants look very similar to https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/urls.go would it make sense to consolidate them?

@hakman
Copy link
Member Author

hakman commented Sep 17, 2020

This new logic and the constants look very similar to https://github.com/kubernetes/kops/blob/master/upup/pkg/fi/cloudup/urls.go would it make sense to consolidate them?

It would make sense to move this to a function somewhere they both could use, but no idea where. It can also be done in a followup PR once we agree where to extract it.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed 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. labels Sep 18, 2020
@hakman hakman force-pushed the hash-mirrors branch 2 times, most recently from 654d8a8 to 3d4bfa6 Compare September 18, 2020 06:32
@hakman hakman requested a review from zetaab September 18, 2020 06:36
@hakman
Copy link
Member Author

hakman commented Sep 18, 2020

/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 Sep 18, 2020
pkg/assets/builder.go Outdated Show resolved Hide resolved
@hakman hakman changed the title Use kops mirrors also to determine artifacts hashes Use all kops mirrors to determine artifacts hashes Sep 18, 2020
@hakman hakman requested a review from johngmyers September 18, 2020 06:53
Copy link
Member

@zetaab zetaab left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2020
@k8s-ci-robot k8s-ci-robot merged commit f07d248 into kubernetes:master Sep 18, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Sep 18, 2020
@hakman hakman deleted the hash-mirrors branch October 11, 2020 06:30
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kops has a hard dependency on https://kubeupv2.s3.amazonaws.com
5 participants