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

Create assetdata #16438

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Create assetdata #16438

merged 2 commits into from
Apr 2, 2024

Conversation

justinsb
Copy link
Member

We create some yaml files that record the hashes for well-known file assets,
and then we will be able to look them up by their canonical URL.

This is not yet actually used, that can be done in a future commit.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 30, 2024
@justinsb justinsb force-pushed the create_assetdata branch 4 times, most recently from e01d5a8 to aa92d0d Compare March 30, 2024 21:35
@hakman
Copy link
Member

hakman commented Mar 31, 2024

Very nice. Should make things much faster.
Could we remove all arch that we don't need from k8s and runc data and merge them into a single file instead of one per version?
Also, generate-*.sh files may be easier to use from hack/.

@justinsb justinsb force-pushed the create_assetdata branch 2 times, most recently from 123fdde to 35d7dc9 Compare April 1, 2024 13:18
@justinsb
Copy link
Member Author

justinsb commented Apr 1, 2024

Good suggestions - agree with all of them!

  • I moved the script to hack/generate-asset-hashes.sh.
  • I exclude some of the most obvious things we don't need for k8s, to try to reduce the asset size. We could also go the other way I guess, and build them up with e.g. --include (i.e. just kubelet / kubectl I think).
  • I combined them into one file per major, rather than one file per patch (i.e. k8s-1.28.yaml vs k8s-1.28.1.yaml). This feels like a reasonable trade-off, because then we will just see whole files drop off as we stop supporting those k8s versions (though it's not time critical that we do so)

We create some yaml files that record the hashes for well-known file assets,
and then we will be able to look them up by their canonical URL.

This is not yet actually used, that can be done in a future commit.
@hakman
Copy link
Member

hakman commented Apr 1, 2024

I guess the only thing left is to pass shellcheck.

In ./hack/generate-asset-hashes.sh line 18:
cd "${REPO_ROOT}"
^---------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Did you mean: 
cd "${REPO_ROOT}" || exit

For more information:
  https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 2, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 2, 2024
@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 Apr 2, 2024
@k8s-ci-robot k8s-ci-robot merged commit 845c232 into kubernetes:master Apr 2, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Apr 2, 2024
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants