Bumping node archives to latest stable versions#1872
Conversation
Signed-off-by: Distroless Bot <distroless-bot@google.com>
Summary of ChangesHello @distroless-bot, 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 focuses on maintaining the project's dependencies by upgrading the Node.js runtime to its most recent stable release, version 22.20.0. This ensures the application benefits from the latest performance improvements, security fixes, and features provided by the Node.js ecosystem. The update involves modifications to the Bazel module configuration, its corresponding lock file, and a minor adjustment to a test case to validate the new version. Highlights
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
|
There was a problem hiding this comment.
Code Review
This pull request updates the Node.js 22 archives from version 22.19.0 to 22.20.0. The changes are consistent across the Bazel lock file, the Starlark build definitions, and the test data. I've included a suggestion to refactor the build definitions to improve maintainability for future updates.
| node_archive( | ||
| name = "nodejs22_amd64", | ||
| sha256 = "d36e56998220085782c0ca965f9d51b7726335aed2f5fc7321c6c0ad233aa96d", | ||
| strip_prefix = "node-v22.19.0-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.gz"], | ||
| version = "22.19.0", | ||
| sha256 = "eeaccb0378b79406f2208e8b37a62479c70595e20be6b659125eb77dd1ab2a29", | ||
| strip_prefix = "node-v22.20.0-linux-x64/", | ||
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-x64.tar.gz"], | ||
| version = "22.20.0", | ||
| architecture = "amd64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_arm64", | ||
| sha256 = "d32817b937219b8f131a28546035183d79e7fd17a86e38ccb8772901a7cd9009", | ||
| strip_prefix = "node-v22.19.0-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-arm64.tar.gz"], | ||
| version = "22.19.0", | ||
| sha256 = "4181609e03dcb9880e7e5bf956061ecc0503c77a480c6631d868cb1f65a2c7dd", | ||
| strip_prefix = "node-v22.20.0-linux-arm64/", | ||
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-arm64.tar.gz"], | ||
| version = "22.20.0", | ||
| architecture = "arm64", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_arm", | ||
| sha256 = "969037e6da2a710904d121dcb998510bc0d5d4d61d70ce5eb578096cf36c60e8", | ||
| strip_prefix = "node-v22.19.0-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-armv7l.tar.gz"], | ||
| version = "22.19.0", | ||
| sha256 = "607380e96e1543c5ca6dc8a9f5575181b2855b8769fb31d646ef9cf27224f300", | ||
| strip_prefix = "node-v22.20.0-linux-armv7l/", | ||
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-armv7l.tar.gz"], | ||
| version = "22.20.0", | ||
| architecture = "arm", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_ppc64le", | ||
| sha256 = "b18b05265c5586e0a7797831ed747eeac7300fd2c495b8b5276596823b076e12", | ||
| strip_prefix = "node-v22.19.0-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-ppc64le.tar.gz"], | ||
| version = "22.19.0", | ||
| sha256 = "f96e25a3ef6cbaa992c9bdccaf18684d12fbcbc9751bf0a85407715641f1930e", | ||
| strip_prefix = "node-v22.20.0-linux-ppc64le/", | ||
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-ppc64le.tar.gz"], | ||
| version = "22.20.0", | ||
| architecture = "ppc64le", | ||
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| node_archive( | ||
| name = "nodejs22_s390x", | ||
| sha256 = "d434665268adf0670a36676f5f3f46aaf5e13aad3fc81dac87119e871745bf22", | ||
| strip_prefix = "node-v22.19.0-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-s390x.tar.gz"], | ||
| version = "22.19.0", | ||
| sha256 = "53471055edba3c4f2d3a7d8d0a61b43a7b193715791c4ad01a47d99863b98980", | ||
| strip_prefix = "node-v22.20.0-linux-s390x/", | ||
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-s390x.tar.gz"], | ||
| version = "22.20.0", | ||
| architecture = "s390x", | ||
| control = "//nodejs:control", | ||
| ) |
There was a problem hiding this comment.
To improve maintainability and reduce repetition, consider refactoring these node_archive definitions. You can use a dictionary to store architecture-specific details and a loop to generate the archives. This will make future version bumps much easier, as you'll only need to update the version and hashes in one place. This refactoring could also be applied to the definitions for other Node.js versions in this file.
| node_archive( | |
| name = "nodejs22_amd64", | |
| sha256 = "d36e56998220085782c0ca965f9d51b7726335aed2f5fc7321c6c0ad233aa96d", | |
| strip_prefix = "node-v22.19.0-linux-x64/", | |
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.gz"], | |
| version = "22.19.0", | |
| sha256 = "eeaccb0378b79406f2208e8b37a62479c70595e20be6b659125eb77dd1ab2a29", | |
| strip_prefix = "node-v22.20.0-linux-x64/", | |
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-x64.tar.gz"], | |
| version = "22.20.0", | |
| architecture = "amd64", | |
| control = "//nodejs:control", | |
| ) | |
| node_archive( | |
| name = "nodejs22_arm64", | |
| sha256 = "d32817b937219b8f131a28546035183d79e7fd17a86e38ccb8772901a7cd9009", | |
| strip_prefix = "node-v22.19.0-linux-arm64/", | |
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-arm64.tar.gz"], | |
| version = "22.19.0", | |
| sha256 = "4181609e03dcb9880e7e5bf956061ecc0503c77a480c6631d868cb1f65a2c7dd", | |
| strip_prefix = "node-v22.20.0-linux-arm64/", | |
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-arm64.tar.gz"], | |
| version = "22.20.0", | |
| architecture = "arm64", | |
| control = "//nodejs:control", | |
| ) | |
| node_archive( | |
| name = "nodejs22_arm", | |
| sha256 = "969037e6da2a710904d121dcb998510bc0d5d4d61d70ce5eb578096cf36c60e8", | |
| strip_prefix = "node-v22.19.0-linux-armv7l/", | |
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-armv7l.tar.gz"], | |
| version = "22.19.0", | |
| sha256 = "607380e96e1543c5ca6dc8a9f5575181b2855b8769fb31d646ef9cf27224f300", | |
| strip_prefix = "node-v22.20.0-linux-armv7l/", | |
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-armv7l.tar.gz"], | |
| version = "22.20.0", | |
| architecture = "arm", | |
| control = "//nodejs:control", | |
| ) | |
| node_archive( | |
| name = "nodejs22_ppc64le", | |
| sha256 = "b18b05265c5586e0a7797831ed747eeac7300fd2c495b8b5276596823b076e12", | |
| strip_prefix = "node-v22.19.0-linux-ppc64le/", | |
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-ppc64le.tar.gz"], | |
| version = "22.19.0", | |
| sha256 = "f96e25a3ef6cbaa992c9bdccaf18684d12fbcbc9751bf0a85407715641f1930e", | |
| strip_prefix = "node-v22.20.0-linux-ppc64le/", | |
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-ppc64le.tar.gz"], | |
| version = "22.20.0", | |
| architecture = "ppc64le", | |
| control = "//nodejs:control", | |
| ) | |
| node_archive( | |
| name = "nodejs22_s390x", | |
| sha256 = "d434665268adf0670a36676f5f3f46aaf5e13aad3fc81dac87119e871745bf22", | |
| strip_prefix = "node-v22.19.0-linux-s390x/", | |
| urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-s390x.tar.gz"], | |
| version = "22.19.0", | |
| sha256 = "53471055edba3c4f2d3a7d8d0a61b43a7b193715791c4ad01a47d99863b98980", | |
| strip_prefix = "node-v22.20.0-linux-s390x/", | |
| urls = ["https://nodejs.org/dist/v22.20.0/node-v22.20.0-linux-s390x.tar.gz"], | |
| version = "22.20.0", | |
| architecture = "s390x", | |
| control = "//nodejs:control", | |
| ) | |
| NODE22_VERSION = "22.20.0" | |
| NODE22_ARCHS = { | |
| "amd64": ("x64", "eeaccb0378b79406f2208e8b37a62479c70595e20be6b659125eb77dd1ab2a29"), | |
| "arm64": ("arm64", "4181609e03dcb9880e7e5bf956061ecc0503c77a480c6631d868cb1f65a2c7dd"), | |
| "arm": ("armv7l", "607380e96e1543c5ca6dc8a9f5575181b2855b8769fb31d646ef9cf27224f300"), | |
| "ppc64le": ("ppc64le", "f96e25a3ef6cbaa992c9bdccaf18684d12fbcbc9751bf0a85407715641f1930e"), | |
| "s390x": ("s390x", "53471055edba3c4f2d3a7d8d0a61b43a7b193715791c4ad01a47d99863b98980"), | |
| } | |
| for arch, (suffix, sha) in NODE22_ARCHS.items(): | |
| node_archive( | |
| name = "nodejs22_" + arch, | |
| sha256 = sha, | |
| strip_prefix = "node-v{v}-linux-{s}/".format(v = NODE22_VERSION, s = suffix), | |
| urls = ["https://nodejs.org/dist/v{v}/node-v{v}-linux-{s}.tar.gz".format(v = NODE22_VERSION, s = suffix)], | |
| version = NODE22_VERSION, | |
| architecture = arch, | |
| control = "//nodejs:control", | |
| ) |
|
🌳 🔄 Image Check This pull request has modified the following images: //nodejs:nodejs22_debug_root_amd64_debian12
//nodejs:nodejs22_nonroot_arm64_debian12
//nodejs:nodejs22_nonroot_amd64_debian12
//nodejs:nodejs22_root_arm64_debian12
//nodejs:nodejs22_debug_nonroot_amd64_debian12
//nodejs:nodejs22_nonroot_amd64_debian12
//nodejs:nodejs22_nonroot_arm64_debian12
//nodejs:nodejs22_root_amd64_debian12
//nodejs:nodejs22_debug_root_arm_debian12
//nodejs:nodejs22_root_arm_debian12
//nodejs:nodejs22_root_arm64_debian12
//nodejs:nodejs22_debug_root_arm64_debian12
//nodejs:nodejs22_root_s390x_debian12
//nodejs:nodejs22_nonroot_arm_debian12
//nodejs:nodejs22_debug_nonroot_s390x_debian12
//nodejs:nodejs22_root_s390x_debian12
//nodejs:nodejs22_nonroot_s390x_debian12
//nodejs:nodejs22_debug_nonroot_arm64_debian12
//nodejs:nodejs22_debug_nonroot_arm_debian12
//nodejs:nodejs22_nonroot_s390x_debian12
//nodejs:nodejs22_nonroot_arm_debian12
//nodejs:nodejs22_debug_root_arm64_debian12
//nodejs:nodejs22_root_ppc64le_debian12
//nodejs:nodejs22_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_root_amd64_debian12
//nodejs:nodejs22_debug_root_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_arm64_debian12
//nodejs:nodejs22_debug_nonroot_amd64_debian12
//nodejs:nodejs22_root_amd64_debian12
//nodejs:nodejs22_debug_root_s390x_debian12
//nodejs:nodejs22_root_arm_debian12
//nodejs:nodejs22_root_ppc64le_debian12
//nodejs:nodejs22_debug_root_s390x_debian12
//nodejs:nodejs22_debug_nonroot_arm_debian12
//nodejs:nodejs22_debug_nonroot_ppc64le_debian12
//nodejs:nodejs22_debug_nonroot_s390x_debian12
//nodejs:nodejs22_debug_root_arm_debian12
//nodejs:nodejs22_debug_root_ppc64le_debian12
//nodejs:nodejs22_nonroot_ppc64le_debian12You can check the details in the report here |
Signed-off-by: Distroless Bot distroless-bot@google.com