Skip to content

Auto-installs pulumi if it's not available on the user's machine#59

Merged
divyashreepathihalli merged 2 commits intomainfrom
auto-install-pulumi
Feb 27, 2026
Merged

Auto-installs pulumi if it's not available on the user's machine#59
divyashreepathihalli merged 2 commits intomainfrom
auto-install-pulumi

Conversation

@JyotinderSingh
Copy link
Collaborator

Auto-install Pulumi CLI

Users no longer need to manually install the Pulumi CLI. PulumiCommand.install() from the Automation API now handles downloading and managing the binary automatically when get_stack() is called.

Changes

  • stack_manager.py: Use PulumiCommand.install() to auto-install the CLI and pass it to LocalWorkspaceOptions. Logs a message when a fresh install is needed.
  • prerequisites_check.py: Remove the check_pulumi() prerequisite since the CLI is now self-managed.
  • prerequisites_check_test.py: Remove check_pulumi test cases.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JyotinderSingh, 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 user experience by automating the installation of the Pulumi CLI. Users no longer need to manually ensure Pulumi is installed, as the system will now detect its absence and install it on demand. This change streamlines the setup process and reduces potential friction for new users, making the keras-remote infrastructure management more robust and user-friendly.

Highlights

  • Automated Pulumi CLI Installation: The Pulumi CLI is now automatically installed if not found on the user's machine, removing the need for manual installation. This is handled by PulumiCommand.install() from the Automation API when get_stack() is called.
  • Removed Manual Prerequisite Check: The explicit check_pulumi() prerequisite function has been removed, as the CLI is now self-managed by the automation API.
  • Streamlined Test Suite: Test cases related to checking the Pulumi CLI's presence have been removed from prerequisites_check_test.py, simplifying the test suite.

🧠 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
  • keras_remote/cli/infra/stack_manager.py
    • Imported shutil and click modules.
    • Implemented logic to check for the Pulumi CLI and initiate an automatic installation via pulumi.automation.PulumiCommand.install() if it's not found, displaying a message to the user.
    • Configured LocalWorkspaceOptions to use the automatically managed Pulumi command.
  • keras_remote/cli/prerequisites_check.py
    • Updated the module docstring to reflect the removal of Pulumi CLI checks.
    • Removed the check_pulumi function, which previously verified the Pulumi CLI installation.
    • Removed the call to check_pulumi() from the check_all function.
  • keras_remote/cli/prerequisites_check_test.py
    • Removed the parameterized import as it is no longer needed for these tests.
    • Removed check_pulumi from the import list.
    • Refactored TestToolChecks to remove all test cases related to check_pulumi, focusing solely on kubectl checks.
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
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 valuable improvement by automatically installing the Pulumi CLI, simplifying the setup process for users. This change aligns well with the project's design principles of automation and user-friendliness. The removal of the manual prerequisite check for Pulumi is correctly implemented. I have one suggestion for stack_manager.py to refine the user-facing message during the auto-installation process, making it less repetitive and more intuitive. Overall, this is a solid enhancement.

@divyashreepathihalli divyashreepathihalli merged commit 786604d into main Feb 27, 2026
4 checks passed
@JyotinderSingh JyotinderSingh deleted the auto-install-pulumi branch February 28, 2026 01:32
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.

2 participants