Skip to content

Binary dependencies downloading script#5354

Merged
Neelabh94 merged 10 commits intoGoogleCloudPlatform:developfrom
scaliby:dep-checksum-script
Mar 17, 2026
Merged

Binary dependencies downloading script#5354
Neelabh94 merged 10 commits intoGoogleCloudPlatform:developfrom
scaliby:dep-checksum-script

Conversation

@scaliby
Copy link
Copy Markdown
Contributor

@scaliby scaliby commented Mar 13, 2026

Submission Checklist

Adds functionality of auto downloading binary dependencies on CTK launch.

@github-actions github-actions bot added the external PR from external contributor label Mar 13, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces an automated system for managing and verifying the integrity of critical external binary dependencies, specifically Terraform and Packer. By adding a script that fetches and embeds official checksums into the codebase, it establishes a robust method to ensure that only trusted versions of these tools are utilized, thereby enhancing the overall security posture and reliability of the project.

Highlights

  • New Dependency Management Script: A new Bash script, tools/update-dependencies.sh, has been introduced to automate the process of fetching and updating checksums for external binary dependencies.
  • Automated Checksum Generation: The script downloads SHA256 checksums for specified versions of Terraform and Packer from their official release pages.
  • Generated Go Checksum File: The fetched checksums are then used to generate a Go source file, pkg/dependencies/checksums_generated.go, which contains the expected checksums and version numbers for these tools.
  • Enhanced Security and Integrity: This mechanism ensures that the application uses verified versions of Terraform and Packer, improving security and integrity by preventing the use of tampered or incorrect binaries.
Changelog
  • pkg/dependencies/checksums_generated.go
    • Added a new Go file that is automatically generated to store the SHA256 checksums and version numbers for Terraform and Packer binaries.
  • tools/update-dependencies.sh
    • Added a new Bash script responsible for fetching the latest SHA256 checksums for Terraform and Packer from their release pages.
    • Implemented logic within the script to parse the downloaded checksums and dynamically generate the pkg/dependencies/checksums_generated.go file.
Activity
  • No human activity has been recorded on 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
Copy Markdown
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 a shell script to automatically download and update checksums for Terraform and Packer, storing them in a generated Go file. The implementation is functional, but the script contains duplicated code for handling each dependency. I've suggested refactoring it to use a function, which will improve maintainability and make it easier to add more dependencies in the future, in line with the repository's style guide.

@scaliby scaliby force-pushed the dep-checksum-script branch from d2eabf9 to b0ef800 Compare March 13, 2026 09:53
@scaliby scaliby marked this pull request as ready for review March 13, 2026 09:53
@scaliby scaliby requested review from a team and samskillman as code owners March 13, 2026 09:53
@siddhartha-quad
Copy link
Copy Markdown
Contributor

/gcbrun

Neelabh94
Neelabh94 previously approved these changes Mar 13, 2026
@scaliby scaliby force-pushed the dep-checksum-script branch from 63addd9 to 406c38a Compare March 13, 2026 14:26
@scaliby scaliby requested a review from Neelabh94 March 13, 2026 14:27
@scaliby scaliby changed the title Binary dependencies checksum downloading script Binary dependencies downloading script Mar 16, 2026
@scaliby scaliby requested a review from bytetwin March 17, 2026 08:35
@bytetwin bytetwin added the enhancement New feature or request label Mar 17, 2026
@bytetwin
Copy link
Copy Markdown
Collaborator

/gcbrun

@scaliby scaliby requested a review from bytetwin March 17, 2026 10:08
bytetwin
bytetwin previously approved these changes Mar 17, 2026
@Neelabh94
Copy link
Copy Markdown
Contributor

@scaliby could you please look at the pre-commit failures and resolve them.

@Neelabh94 Neelabh94 added the release-improvements Added to release notes under the "Improvements" heading. label Mar 17, 2026
@scaliby
Copy link
Copy Markdown
Contributor Author

scaliby commented Mar 17, 2026

@Neelabh94 should be good now

@scaliby scaliby requested a review from bytetwin March 17, 2026 11:52
@Neelabh94
Copy link
Copy Markdown
Contributor

@Neelabh94 should be good now

re-running the tests

@Neelabh94
Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94 Neelabh94 force-pushed the dep-checksum-script branch from 26ccdcb to 4570b0e Compare March 17, 2026 12:37
@Neelabh94
Copy link
Copy Markdown
Contributor

Neelabh94 commented Mar 17, 2026

@scaliby few tests were still failing due to Go version mismatch that was recently fixed in the develop branch.

Have rebased with the develop branch and re-ran the tests. Should pass now.

@Neelabh94
Copy link
Copy Markdown
Contributor

/gcbrun

@scaliby scaliby force-pushed the dep-checksum-script branch from 4570b0e to afc04ec Compare March 17, 2026 12:50
@scaliby scaliby force-pushed the dep-checksum-script branch from afc04ec to cc2f9dc Compare March 17, 2026 12:50
@scaliby
Copy link
Copy Markdown
Contributor Author

scaliby commented Mar 17, 2026

@Neelabh94 rebased on top of the latest develop

@Neelabh94
Copy link
Copy Markdown
Contributor

@scaliby The integration test is failing due to insufficient Go test coverage in the hpc-toolkit/pkg/dependencies package (15.2% instead of the required 80%).

@scaliby
Copy link
Copy Markdown
Contributor Author

scaliby commented Mar 17, 2026

@Neelabh94 I added more tests. Could you re-run it?

@Neelabh94
Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94
Copy link
Copy Markdown
Contributor

Neelabh94 commented Mar 17, 2026

@bytetwin could you please review once again.

@scaliby
Copy link
Copy Markdown
Contributor Author

scaliby commented Mar 17, 2026

@bytetwin @Neelabh94 I don't have permissions for merging. Could you please merge?

@Neelabh94 Neelabh94 merged commit 1cca13e into GoogleCloudPlatform:develop Mar 17, 2026
13 of 77 checks passed
Neelabh94 pushed a commit to Neelabh94/cluster-toolkit that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request external PR from external contributor release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants