Bumping node archives to latest stable versions#2033
Conversation
Signed-off-by: Distroless Bot <distroless-bot@google.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the project's Node.js dependencies to their latest stable patch versions, specifically moving from Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
🌳 🔧 Config Check This pull request has not modified the root BUILD |
There was a problem hiding this comment.
Code Review
This pull request updates the Node.js archives for versions 20 and 22 to their latest stable releases (20.20.1 and 22.22.1 respectively). The changes are consistent across the Bazel module definitions, lock file, and test data. I've suggested a refactoring in private/extensions/node.bzl to improve maintainability by reducing code duplication, which should make future updates easier.
| node_archive( | ||
| name = "nodejs20_amd64", | ||
| sha256 = "92dfd59fb4837230abba5d6dd717b882ca897e22fde2f9268e1aac2c4bde0f5b", | ||
| strip_prefix = "node-v20.20.0-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v20.20.0/node-v20.20.0-linux-x64.tar.gz"], | ||
| version = "20.20.0", | ||
| sha256 = "6362e50804cdcc110592201f67beda93bcd702fdcbe1c42840a50d590e3af0ce", | ||
| strip_prefix = "node-v20.20.1-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v20.20.1/node-v20.20.1-linux-x64.tar.gz"], | ||
| version = "20.20.1", | ||
| architecture = "amd64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs20_arm64", | ||
| sha256 = "2b640b7fc19a1d2f12a226d7dfba9baff2de87cc15db5a3e58bcdb15582ac604", | ||
| strip_prefix = "node-v20.20.0-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v20.20.0/node-v20.20.0-linux-arm64.tar.gz"], | ||
| version = "20.20.0", | ||
| sha256 = "d6947e10ddc124284aee92981cc739cd4581a6b4bf89520792f2b582600195fa", | ||
| strip_prefix = "node-v20.20.1-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v20.20.1/node-v20.20.1-linux-arm64.tar.gz"], | ||
| version = "20.20.1", | ||
| architecture = "arm64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs20_arm", | ||
| sha256 = "2fc5f715c05c7a2662044fbfac5edfcb85d419045ecb2dff53b68f3dc4ec81fb", | ||
| strip_prefix = "node-v20.20.0-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v20.20.0/node-v20.20.0-linux-armv7l.tar.gz"], | ||
| version = "20.20.0", | ||
| sha256 = "6d7b0f1f3a88004b251fd4d2ee2f5c4faca15587a3cdaaefae11e655b9e01cde", | ||
| strip_prefix = "node-v20.20.1-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v20.20.1/node-v20.20.1-linux-armv7l.tar.gz"], | ||
| version = "20.20.1", | ||
| architecture = "arm", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs20_ppc64le", | ||
| sha256 = "8b02c9b00b551d59bd550e6d92e8131f23668fcc71b0937ac2256ee0754e39a7", | ||
| strip_prefix = "node-v20.20.0-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v20.20.0/node-v20.20.0-linux-ppc64le.tar.gz"], | ||
| version = "20.20.0", | ||
| sha256 = "d885a22c1a08bd2d2f91c290770f3a9762075c4ec222fcd9d9fc921b0c8294b9", | ||
| strip_prefix = "node-v20.20.1-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v20.20.1/node-v20.20.1-linux-ppc64le.tar.gz"], | ||
| version = "20.20.1", | ||
| architecture = "ppc64le", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs20_s390x", | ||
| sha256 = "154dd8885646253a12532099ccf9485660bc42e4a56bb1483f4e161fb7f10bb9", | ||
| strip_prefix = "node-v20.20.0-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v20.20.0/node-v20.20.0-linux-s390x.tar.gz"], | ||
| version = "20.20.0", | ||
| sha256 = "7f0688d98fce89a9d7c623a3b0d2eab8374333f31461c8cb8b9d34712c45a1ba", | ||
| strip_prefix = "node-v20.20.1-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v20.20.1/node-v20.20.1-linux-s390x.tar.gz"], | ||
| version = "20.20.1", | ||
| architecture = "s390x", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_amd64", | ||
| sha256 = "c33c39ed9c80deddde77c960d00119918b9e352426fd604ba41638d6526a4744", | ||
| strip_prefix = "node-v22.22.0-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-x64.tar.gz"], | ||
| version = "22.22.0", | ||
| sha256 = "07c8aafa60644fb81adefa1ee7da860eb1920851ffdc9a37020ab0be47fbc10e", | ||
| strip_prefix = "node-v22.22.1-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-x64.tar.gz"], | ||
| version = "22.22.1", | ||
| architecture = "amd64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_arm64", | ||
| sha256 = "25ba95dfb96871fa2ef977f11f95ea90818c8fa15c0f2110771db08d4ba423be", | ||
| strip_prefix = "node-v22.22.0-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-arm64.tar.gz"], | ||
| version = "22.22.0", | ||
| sha256 = "1d1690e9aba47e887a275abc6d8f7317e571a0700deaef493f768377e99155f5", | ||
| strip_prefix = "node-v22.22.1-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-arm64.tar.gz"], | ||
| version = "22.22.1", | ||
| architecture = "arm64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_arm", | ||
| sha256 = "a92684d8720589f19776fb186c5a3a4d273c13436fc8c44b61dd3eeef81f0d3a", | ||
| strip_prefix = "node-v22.22.0-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-armv7l.tar.gz"], | ||
| version = "22.22.0", | ||
| sha256 = "2b592d21609ef299d1e3918bb806ed62ba715d4109b0f8ec11b132af9fa42d70", | ||
| strip_prefix = "node-v22.22.1-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-armv7l.tar.gz"], | ||
| version = "22.22.1", | ||
| architecture = "arm", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_ppc64le", | ||
| sha256 = "54680eec598330b9863ab37ada46456415b776e46345958476fcd2212abdf0f3", | ||
| strip_prefix = "node-v22.22.0-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-ppc64le.tar.gz"], | ||
| version = "22.22.0", | ||
| sha256 = "18f9ab7da4f3a04ec213590b14e5d78b60bfb5c6b8bf53541e7eaf1adf9d270a", | ||
| strip_prefix = "node-v22.22.1-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-ppc64le.tar.gz"], | ||
| version = "22.22.1", | ||
| architecture = "ppc64le", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_s390x", | ||
| sha256 = "9b24cc6dd17106725d79645adf0a3b62fa3310e4d30aa11147dd3fe2d8325ef4", | ||
| strip_prefix = "node-v22.22.0-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-s390x.tar.gz"], | ||
| version = "22.22.0", | ||
| sha256 = "6128f9d54a1b43258144d7ac074a82d3b6c96d8e9cb3a8e14e4722a66990adbe", | ||
| strip_prefix = "node-v22.22.1-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-s390x.tar.gz"], | ||
| version = "22.22.1", | ||
| architecture = "s390x", | ||
| control = "//nodejs:control", | ||
| ) |
There was a problem hiding this comment.
To improve maintainability and reduce code duplication, you could define the Node.js release information in a data structure and then loop through it to generate the node_archive calls. This would make future version updates much easier and less error-prone, especially since this file appears to be autogenerated.
NODE_RELEASES = {
"20": {
"version": "20.20.1",
"architectures": {
"amd64": ("x64", "6362e50804cdcc110592201f67beda93bcd702fdcbe1c42840a50d590e3af0ce"),
"arm64": ("arm64", "d6947e10ddc124284aee92981cc739cd4581a6b4bf89520792f2b582600195fa"),
"arm": ("armv7l", "6d7b0f1f3a88004b251fd4d2ee2f5c4faca15587a3cdaaefae11e655b9e01cde"),
"ppc64le": ("ppc64le", "d885a22c1a08bd2d2f91c290770f3a9762075c4ec222fcd9d9fc921b0c8294b9"),
"s390x": ("s390x", "7f0688d98fce89a9d7c623a3b0d2eab8374333f31461c8cb8b9d34712c45a1ba"),
},
},
"22": {
"version": "22.22.1",
"architectures": {
"amd64": ("x64", "07c8aafa60644fb81adefa1ee7da860eb1920851ffdc9a37020ab0be47fbc10e"),
"arm64": ("arm64", "1d1690e9aba47e887a275abc6d8f7317e571a0700deaef493f768377e99155f5"),
"arm": ("armv7l", "2b592d21609ef299d1e3918bb806ed62ba715d4109b0f8ec11b132af9fa42d70"),
"ppc64le": ("ppc64le", "18f9ab7da4f3a04ec213590b14e5d78b60bfb5c6b8bf53541e7eaf1adf9d270a"),
"s390x": ("s390x", "6128f9d54a1b43258144d7ac074a82d3b6c96d8e9cb3a8e14e4722a66990adbe"),
},
},
}
for major, release in NODE_RELEASES.items():
version = release["version"]
for arch, (suffix, sha256) in release["architectures"].items():
node_archive(
name = "nodejs{}_{}".format(major, arch),
sha256 = sha256,
strip_prefix = "node-v{}-linux-{}/".format(version, suffix),
urls = ["https://nodejs.org/dist/v{}/node-v{}-linux-{}.tar.gz".format(version, version, suffix)],
version = version,
architecture = arch,
control = "//nodejs:control",
)
|
🌳 🔄 Image Check This pull request has modified the following images: //nodejs:nodejs20_root_amd64_debian13
//nodejs:nodejs20_root_amd64_debian13
//nodejs:nodejs20_nonroot_arm64_debian13
//nodejs:nodejs20_nonroot_amd64_debian13
//nodejs:nodejs20_debug_root_amd64_debian13
//nodejs:nodejs20_debug_root_arm64_debian13
//nodejs:nodejs20_debug_root_arm_debian13
//nodejs:nodejs20_debug_root_amd64_debian13
//nodejs:nodejs20_debug_nonroot_arm_debian13
//nodejs:nodejs20_root_arm64_debian13
//nodejs:nodejs20_debug_nonroot_arm64_debian13
//nodejs:nodejs20_debug_root_s390x_debian13
//nodejs:nodejs20_root_arm64_debian13
//nodejs:nodejs20_nonroot_s390x_debian13
//nodejs:nodejs20_debug_nonroot_arm64_debian13
//nodejs:nodejs20_nonroot_arm_debian13
//nodejs:nodejs20_debug_nonroot_amd64_debian13
//nodejs:nodejs20_debug_root_s390x_debian13
//nodejs:nodejs20_root_ppc64le_debian13
//nodejs:nodejs20_root_s390x_debian13
//nodejs:nodejs20_debug_root_ppc64le_debian13
//nodejs:nodejs20_debug_nonroot_amd64_debian13
//nodejs:nodejs20_nonroot_arm_debian13
//nodejs:nodejs22_root_amd64_debian13
//nodejs:nodejs20_debug_nonroot_ppc64le_debian13
//nodejs:nodejs22_nonroot_amd64_debian13
//nodejs:nodejs20_nonroot_amd64_debian13
//nodejs:nodejs20_nonroot_arm64_debian13
//nodejs:nodejs22_debug_nonroot_arm64_debian13
//nodejs:nodejs22_root_arm64_debian13
//nodejs:nodejs22_debug_root_amd64_debian13
//nodejs:nodejs20_debug_nonroot_arm_debian13
//nodejs:nodejs22_root_arm_debian13
//nodejs:nodejs22_debug_nonroot_arm_debian13
//nodejs:nodejs22_debug_nonroot_arm_debian13
//nodejs:nodejs20_root_s390x_debian13
//nodejs:nodejs20_debug_root_ppc64le_debian13
//nodejs:nodejs20_nonroot_ppc64le_debian13
//nodejs:nodejs20_debug_nonroot_ppc64le_debian13
//nodejs:nodejs22_debug_root_arm_debian13
//nodejs:nodejs22_root_arm_debian13
//nodejs:nodejs20_root_arm_debian13
//nodejs:nodejs22_debug_root_amd64_debian13
//nodejs:nodejs22_debug_nonroot_amd64_debian13
//nodejs:nodejs22_debug_nonroot_arm64_debian13
//nodejs:nodejs20_nonroot_s390x_debian13
//nodejs:nodejs20_debug_nonroot_s390x_debian13
//nodejs:nodejs22_debug_root_arm64_debian13
//nodejs:nodejs22_root_amd64_debian13
//nodejs:nodejs20_debug_root_arm_debian13
//nodejs:nodejs22_nonroot_arm_debian13
//nodejs:nodejs22_nonroot_arm_debian13
//nodejs:nodejs22_nonroot_arm64_debian13
//nodejs:nodejs20_debug_nonroot_s390x_debian13
//nodejs:nodejs20_nonroot_ppc64le_debian13
//nodejs:nodejs20_root_arm_debian13
//nodejs:nodejs22_root_arm64_debian13
//nodejs:nodejs20_root_ppc64le_debian13
//nodejs:nodejs22_root_s390x_debian13
//nodejs:nodejs22_nonroot_amd64_debian13
//nodejs:nodejs22_root_ppc64le_debian13
//nodejs:nodejs20_debug_root_arm64_debian13
//nodejs:nodejs22_debug_root_s390x_debian13
//nodejs:nodejs22_debug_nonroot_amd64_debian13
//nodejs:nodejs22_debug_root_arm64_debian13
//nodejs:nodejs22_debug_root_arm_debian13
//nodejs:nodejs22_nonroot_arm64_debian13
//nodejs:nodejs22_nonroot_s390x_debian13
//nodejs:nodejs22_debug_nonroot_ppc64le_debian13
//nodejs:nodejs22_debug_nonroot_s390x_debian13
//nodejs:nodejs22_debug_root_s390x_debian13
//nodejs:nodejs22_debug_nonroot_ppc64le_debian13
//nodejs:nodejs22_debug_nonroot_s390x_debian13
//nodejs:nodejs22_nonroot_ppc64le_debian13
//nodejs:nodejs22_root_s390x_debian13
//nodejs:nodejs22_nonroot_s390x_debian13
//nodejs:nodejs22_debug_root_ppc64le_debian13
//nodejs:nodejs22_root_ppc64le_debian13
//nodejs:nodejs22_debug_root_ppc64le_debian13
//nodejs:nodejs22_nonroot_ppc64le_debian13You can check the details in the report here |
Signed-off-by: Distroless Bot distroless-bot@google.com