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

node build: Extract version from remote URL #3800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stmcginnis
Copy link
Contributor

At some point changes were made to the structure of the community published tarballs where the expected "version" file is no longer present. This causes the build to fail due to not being able to capture the version of the source being built.

Most of the time the requested version is part of the URL for the remote source anyway. This creates a fallback where the version will be extracted from the URL if it cannot be read explicitly from a "version" file in the tarball content.

This does not cover the local tarball file path, or if the user points to a non-community published URL. But in the "normal" usage of pointing to community published tarballs, this will prevent the node build from failing in the cases where there is not a version file present.

Closes: #3797

At some point changes were made to the structure of the community
published tarballs where the expected "version" file is no longer
present. This causes the build to fail due to not being able to capture
the version of the source being built.

Most of the time the requested version is part of the URL for the remote
source anyway. This creates a fallback where the version will be
extracted from the URL if it cannot be read explicitly from a "version"
file in the tarball content.

This does not cover the local tarball file path, or if the user points
to a non-community published URL. But in the "normal" usage of pointing
to community published tarballs, this will prevent the node build from
failing in the cases where there is not a version file present.

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 25, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stmcginnis
Once this PR has been reviewed and has the lgtm label, please assign bentheelder for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 25, 2024
@BenTheElder
Copy link
Member

At some point changes were made to the structure of the community published tarballs where the expected "version" file is no longer present. This causes the build to fail due to not being able to capture the version of the source being built.

This is likely a bug in the upstream release process and we should open an issue to discuss this with release engineering.

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

This is a breaking change for anyone that was just hosting a tarball at an arbitrary path (versus upstream)

I would really prefer that our release artifacts actually contain the version information in a self-contained way, as a project, and I'm all but certain they did at some point ..

@stmcginnis
Copy link
Contributor Author

This is a breaking change for anyone that was just hosting a tarball at an arbitrary path (versus upstream)

I don't think this is a breaking change. It will still try to read the version from an included "version" file. If that file is not present, and the URL does not contain a version number in the path, there will be no difference in behavior. I.e., it will still fail, or the version file is present and it will work exactly like it did before.

Agree we need to root cause the artifact issue, but think this could be useful either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I cannot use kind build node-image, complains about invalid directory and it true its not there
3 participants