Skip to content

Conversation

@loosebazooka
Copy link
Member

@loosebazooka loosebazooka commented Oct 29, 2025

same as #1902 #1896 for nodejs

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @loosebazooka, 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 significantly reworks the Node.js build process by refactoring existing build rules into dedicated Starlark functions within a new nodejs.bzl file. This change improves the organization and maintainability of the build system. Additionally, it extends the build configuration to support preview distributions, such as Debian 13, ensuring broader compatibility for Node.js images.

Highlights

  • Refactored Node.js Build System: The Node.js image and index build rules have been extracted from nodejs/BUILD into a new Starlark file, nodejs/nodejs.bzl, promoting modularity and reusability.
  • Added Support for Preview Distributions: The build configuration now includes PREVIEW_DISTROS when generating Node.js image targets, expanding the range of supported distributions, which includes Debian 13 as per the PR title.
  • Consolidated Rule Definitions: The logic for creating oci_image, oci_image_index, and container_structure_test rules for Node.js images is now encapsulated within nodejs_image and nodejs_image_index functions in nodejs.bzl.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Node.js image build logic into a new nodejs.bzl file, improving modularity and maintainability. It also adds support for debian13 as a preview distribution. The refactoring is well-executed. My review includes a few suggestions for cleaning up unused imports, variables, and commented-out code that were likely left over from the refactoring process. Addressing these will enhance the clarity and maintainability of the new build files.

"nonroot",
]
# NODEJS_ARCHITECTURES = ARCHITECTURES
# using node_arch for now, but we can probably get rid of that
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once we drop support for 20 and 22, we can drop node_arch in favor of BASE_ARCHITECTURES + ["s390x", "ppc64le"] (similar to ARCHITECTURES, just without arm)

Copy link
Member Author

@loosebazooka loosebazooka Oct 29, 2025

Choose a reason for hiding this comment

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

I think maybe we don't need a centralized ARCH var that every different package munges with. I'll try to clean that part up too in the future.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🌳 🔄 Image Check

This pull request has modified the following images:

//nodejs:nodejs20_root_amd64_debian13 (new)
//nodejs:nodejs20_nonroot_amd64_debian13 (new)
//nodejs:nodejs20_debug_root_amd64_debian13 (new)
//nodejs:nodejs20_debug_nonroot_amd64_debian13 (new)
//nodejs:nodejs20_root_arm64_debian13 (new)
//nodejs:nodejs20_nonroot_arm64_debian13 (new)
//nodejs:nodejs20_debug_root_arm64_debian13 (new)
//nodejs:nodejs20_debug_nonroot_arm64_debian13 (new)
//nodejs:nodejs20_root_arm_debian13 (new)
//nodejs:nodejs20_nonroot_arm_debian13 (new)
//nodejs:nodejs20_debug_root_arm_debian13 (new)
//nodejs:nodejs20_debug_nonroot_arm_debian13 (new)
//nodejs:nodejs20_root_s390x_debian13 (new)
//nodejs:nodejs20_nonroot_s390x_debian13 (new)
//nodejs:nodejs20_debug_root_s390x_debian13 (new)
//nodejs:nodejs20_debug_nonroot_s390x_debian13 (new)
//nodejs:nodejs20_root_ppc64le_debian13 (new)
//nodejs:nodejs20_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs20_debug_root_ppc64le_debian13 (new)
//nodejs:nodejs20_debug_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs22_root_amd64_debian13 (new)
//nodejs:nodejs22_nonroot_amd64_debian13 (new)
//nodejs:nodejs22_debug_root_amd64_debian13 (new)
//nodejs:nodejs22_debug_nonroot_amd64_debian13 (new)
//nodejs:nodejs22_root_arm64_debian13 (new)
//nodejs:nodejs22_nonroot_arm64_debian13 (new)
//nodejs:nodejs22_debug_root_arm64_debian13 (new)
//nodejs:nodejs22_debug_nonroot_arm64_debian13 (new)
//nodejs:nodejs22_root_arm_debian13 (new)
//nodejs:nodejs22_nonroot_arm_debian13 (new)
//nodejs:nodejs22_debug_root_arm_debian13 (new)
//nodejs:nodejs22_debug_nonroot_arm_debian13 (new)
//nodejs:nodejs22_root_s390x_debian13 (new)
//nodejs:nodejs22_nonroot_s390x_debian13 (new)
//nodejs:nodejs22_debug_root_s390x_debian13 (new)
//nodejs:nodejs22_debug_nonroot_s390x_debian13 (new)
//nodejs:nodejs22_root_ppc64le_debian13 (new)
//nodejs:nodejs22_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs22_debug_root_ppc64le_debian13 (new)
//nodejs:nodejs22_debug_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs24_root_amd64_debian13 (new)
//nodejs:nodejs24_nonroot_amd64_debian13 (new)
//nodejs:nodejs24_debug_root_amd64_debian13 (new)
//nodejs:nodejs24_debug_nonroot_amd64_debian13 (new)
//nodejs:nodejs24_root_arm64_debian13 (new)
//nodejs:nodejs24_nonroot_arm64_debian13 (new)
//nodejs:nodejs24_debug_root_arm64_debian13 (new)
//nodejs:nodejs24_debug_nonroot_arm64_debian13 (new)
//nodejs:nodejs24_root_s390x_debian13 (new)
//nodejs:nodejs24_nonroot_s390x_debian13 (new)
//nodejs:nodejs24_debug_root_s390x_debian13 (new)
//nodejs:nodejs24_debug_nonroot_s390x_debian13 (new)
//nodejs:nodejs24_root_ppc64le_debian13 (new)
//nodejs:nodejs24_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs24_debug_root_ppc64le_debian13 (new)
//nodejs:nodejs24_debug_nonroot_ppc64le_debian13 (new)
//nodejs:nodejs20_root_debian13 (new)
//nodejs:nodejs20_nonroot_debian13 (new)
//nodejs:nodejs20_debug_root_debian13 (new)
//nodejs:nodejs20_debug_nonroot_debian13 (new)
//nodejs:nodejs22_root_debian13 (new)
//nodejs:nodejs22_nonroot_debian13 (new)
//nodejs:nodejs22_debug_root_debian13 (new)
//nodejs:nodejs22_debug_nonroot_debian13 (new)
//nodejs:nodejs24_root_debian13 (new)
//nodejs:nodejs24_nonroot_debian13 (new)
//nodejs:nodejs24_debug_root_debian13 (new)
//nodejs:nodejs24_debug_nonroot_debian13 (new)

You can check the details in the report here

@loosebazooka loosebazooka merged commit bec629a into main Oct 29, 2025
11 checks passed
@loosebazooka loosebazooka deleted the rework_nodejs_build branch October 29, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants