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

Fix Github download url for nodeup #8468

Merged
merged 2 commits into from
Feb 6, 2020
Merged

Conversation

adri
Copy link
Contributor

@adri adri commented Feb 4, 2020

Currently this generates:

NODEUP_URL=https://artifacts.k8s.io/binaries/kops/1.15.1/linux/amd64/nodeup,https://github.com/kubernetes/kops/releases/download/1.15.1/linux-amd64-nodeup,https://kubeupv2.s3.amazonaws.com/kops/1.15.1/linux/amd64/nodeup
NODEUP_HASH=de4939eadb6e4d89fcf608b1f632e770bcce521d6dc5c45d76d2c4608ad23db4

However for the Github URL a v is missing in front of the version tag.

Returns a 404:

curl https://github.com/kubernetes/kops/releases/download/1.15.1/linux-amd64-nodeup

Downloads the file:

curl https://github.com/kubernetes/kops/releases/download/v1.15.1/linux-amd64-nodeup

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 4, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @adri!

It looks like this is your first PR to kubernetes/kops 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kops has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @adri. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 4, 2020
@joshbranham
Copy link
Contributor

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 4, 2020
@joshbranham
Copy link
Contributor

Yeah the name of releases changed to prefix a v. Does this matter for older releases @rifelpet ?

@rifelpet
Copy link
Member

rifelpet commented Feb 4, 2020

yes, we updated the tag in 1.15.1 to be prefixed with v. I'll need to investigate why this happened because we should have only updated the git tag, not the version string that is built into kops.

@justinsb
Copy link
Member

justinsb commented Feb 4, 2020

I think the underlying issue is correct - we are moving to v tags, which means that the github download urls now have a v in them. But as you point out @rifelpet the version in kops does not have a v, hence we build the old URL.

(I assume I should be uploading releases against the v tags as I think eventually we want to stop tagging without the v)

@justinsb
Copy link
Member

justinsb commented Feb 4, 2020

I was wondering if we needed to have logic only to include the v if kops version <= 1.15, but actually we can achieve that with this PR and simply cherry-picking back only to the correct branches. So this approach LGTM.

@adri if you run hack/update-expected.sh kops should fix the expected values for you and the tests should pass (I think). And thanks for the PR!

@rifelpet
Copy link
Member

rifelpet commented Feb 4, 2020

An alternative but potentially more invasive solution is that we include v in the variables themselves:

kops/version.go

Lines 24 to 28 in 6c202ef

// These constants are parsed by build tooling - be careful about changing the formats
const (
KOPS_RELEASE_VERSION = "1.18.0-alpha.1"
KOPS_CI_VERSION = "1.18.0-alpha.2"
)

for reference, both kubectl version, kubelet --version include v in their output, perhaps we should follow suit?

@adri
Copy link
Contributor Author

adri commented Feb 4, 2020

From a user perspective: In my logs I saw issues fetching the first 2 of the 3 URLs.

NODEUP_URL=https://artifacts.k8s.io/binaries/kops/1.15.1/linux/amd64/nodeup,https://github.com/kubernetes/kops/releases/download/1.15.1/linux-amd64-nodeup,https://kubeupv2.s3.amazonaws.com/kops/1.15.1/linux/amd64/nodeup
  1. curl https://artifacts.k8s.io/binaries/kops/1.15.1/linux/amd64/nodeup fails (not sure what the right URL is)
  2. curl https://github.com/kubernetes/kops/releases/download/1.15.1/linux-amd64-nodeup fails because of the missing v
  3. The third URL succeeds 🎉

Whatever the version strategy will be, I think the URLs for 1. and 2. should be somehow aligned.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 6, 2020
@justinsb
Copy link
Member

justinsb commented Feb 6, 2020

@rifelpet I don't mind changing the version number to include the v, except that it is much more invasive and we should probably get the existing releases out first.

I do need to publish these files to artifacts.k8s.io; that's more of a WIP, but having both artifacts.k8s.io and github.com not available will put more load on the 3rd bucket which I'd prefer not to use as our sole source.

I think I've just added the result of running hack/updated-expected.sh, so hopefully this will now pass.

@justinsb
Copy link
Member

justinsb commented Feb 6, 2020

OK this is passing tests after running the script, so proceeding so we can get the releases going. Thanks for spotting and fixing @adri

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adri, justinsb

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 Feb 6, 2020
@k8s-ci-robot k8s-ci-robot merged commit 66228c5 into kubernetes:master Feb 6, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Feb 6, 2020
@rifelpet
Copy link
Member

rifelpet commented Feb 6, 2020

I agree this looks good 👍

k8s-ci-robot added a commit that referenced this pull request Feb 6, 2020
k8s-ci-robot added a commit that referenced this pull request Feb 6, 2020
k8s-ci-robot added a commit that referenced this pull request Feb 6, 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

None yet

5 participants