Skip to content

fix: add network interface to htcondor execute point module + update …#5225

Draft
Thibaut-Nurit wants to merge 2 commits intoGoogleCloudPlatform:developfrom
Thibaut-Nurit:fix-add-multiple-interfaces-htcondor-ep
Draft

fix: add network interface to htcondor execute point module + update …#5225
Thibaut-Nurit wants to merge 2 commits intoGoogleCloudPlatform:developfrom
Thibaut-Nurit:fix-add-multiple-interfaces-htcondor-ep

Conversation

@Thibaut-Nurit
Copy link

…htcondor templates version

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@Thibaut-Nurit Thibaut-Nurit requested review from a team and samskillman as code owners February 10, 2026 13:59
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Thibaut-Nurit, 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 enhances the HTCondor execute point module by introducing the capability to configure multiple network interfaces for instances, providing greater flexibility in network setup and integration. Concurrently, it updates the version constraints for several core Terraform modules used across the HTCondor components (execute point, access point, and central manager) to allow for more recent module versions, improving maintainability and enabling access to new features or bug fixes from the underlying modules.

Highlights

  • Multiple Network Interfaces: Added support for configuring multiple network interfaces for HTCondor execute point instances, enhancing network flexibility.
  • Terraform Module Version Updates: Updated version constraints for several Terraform modules across HTCondor components (execute point, access point, central manager) from optimistic (~>) to minimum (>=), allowing for broader compatibility with newer module versions.
  • Backward Compatibility: Ensured backward compatibility for existing network configurations within the HTCondor execute point module, allowing seamless transition to the new network interface configuration.
Changelog
  • community/modules/compute/htcondor-execute-point/README.md
    • Updated module version constraints for instance template and MIG modules.
    • Documented the newly added network_interfaces input variable.
  • community/modules/compute/htcondor-execute-point/main.tf
    • Implemented logic to handle multiple network interfaces with backward compatibility for existing network configurations.
    • Updated module version constraints for instance template and MIG modules.
    • Modified instance template configuration to utilize the new network_interfaces variable.
  • community/modules/compute/htcondor-execute-point/variables.tf
    • Defined the new network_interfaces input variable, including its type and description.
  • community/modules/scheduler/htcondor-access-point/README.md
    • Updated module version constraints for access point instance template and HTCondor AP modules.
  • community/modules/scheduler/htcondor-access-point/main.tf
    • Updated module version constraints for access point instance template and HTCondor AP modules.
    • Added the region parameter to the access point instance template module.
  • community/modules/scheduler/htcondor-central-manager/README.md
    • Updated module version constraints for central manager instance template and HTCondor CM modules.
  • community/modules/scheduler/htcondor-central-manager/main.tf
    • Updated module version constraints for central manager instance template and HTCondor CM modules.
    • Added the region parameter to the central manager instance template module.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
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 introduces support for multiple network interfaces in the htcondor-execute-point module, including backward compatibility for the old network configuration. It also updates module dependencies across several htcondor modules and adds the region parameter where it was missing. The changes are well-structured. My review includes suggestions to improve maintainability by using more restrictive version constraints for Terraform modules and to enhance the robustness of the new network interface implementation.

module "execute_point_instance_template" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

for network_interface in slice(local.network_interfaces, 1, length(local.network_interfaces)) : {
network = network_interface.network
subnetwork = network_interface.subnetwork
subnetwork_project = var.project_id
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The subnetwork attribute is optional. When it's not provided, network_interface.subnetwork will be null. In this case, subnetwork_project should also be null. Setting it conditionally improves clarity and robustness.

      subnetwork_project = network_interface.subnetwork != null ? var.project_id : null

module "mig" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

module "access_point_instance_template" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

module "htcondor_ap" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

module "central_manager_instance_template" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

module "htcondor_cm" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 12.1"
version = ">= 12.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a permissive version constraint like >= 12.1 can introduce breaking changes from future major versions unexpectedly. It is a best practice to use a more restrictive constraint, such as ~> 12.1, which allows for patch and minor updates but prevents major version bumps (e.g., from 12.x to 13.x). This improves the long-term maintainability and stability of the module.

  version = "~> 12.1"

@Thibaut-Nurit
Copy link
Author

The purpose of this MR is to update the execute point module so it can have multiple network interfaces.
It's backwards compatible.

Also as the version needed for some cluster toolkit modules is hashicorp/google >= 7, I updated terraform-google-modules/vm/google//modules/mig version so it takes versions >= instead of ~> to stay up to date.

@Thibaut-Nurit Thibaut-Nurit force-pushed the fix-add-multiple-interfaces-htcondor-ep branch from 328f929 to cdbb68b Compare February 10, 2026 15:08
@aslam-quad
Copy link
Contributor

/gcbrun

@aslam-quad aslam-quad added the external PR from external contributor label Feb 10, 2026
@arpit974 arpit974 self-requested a review February 11, 2026 04:27
@Thibaut-Nurit Thibaut-Nurit force-pushed the fix-add-multiple-interfaces-htcondor-ep branch from cdbb68b to bfca0e0 Compare February 12, 2026 16:58
@Thibaut-Nurit Thibaut-Nurit marked this pull request as draft February 12, 2026 17:00
@aslam-quad
Copy link
Contributor

/gcbrun

@Thibaut-Nurit Thibaut-Nurit force-pushed the fix-add-multiple-interfaces-htcondor-ep branch 3 times, most recently from 2193e34 to 34ceec0 Compare February 13, 2026 23:17
@Thibaut-Nurit Thibaut-Nurit force-pushed the fix-add-multiple-interfaces-htcondor-ep branch from 34ceec0 to eac13fa Compare February 13, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants