-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix deploy to cloud run on Windows #3536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @anrzeszutek, 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 addresses a critical issue that prevented Cloud Run deployments from Windows environments by correctly handling the invocation of the 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
|
|
Response from ADK Triaging Agent Hello @anrzeszutek, thank you for your contribution! To help reviewers verify the fix, could you please provide a screenshot or console output showing the You can find more details in our contribution guidelines. Thanks! |
There was a problem hiding this 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 correctly fixes an issue with deploying to Cloud Run on Windows by using gcloud.cmd. The change is effective and the tests are updated accordingly. My main feedback is about code duplication. The logic to determine the gcloud command based on the operating system is repeated in src/google/adk/cli/cli_deploy.py (in two different functions) and in the test file. I've added comments suggesting a refactoring to use a single constant for the command name. This will make the code more maintainable and less redundant. Overall, this is a good fix that just needs a small refactoring.
|
@DeanChensj could you help review this one? |
|
Thank you @anrzeszutek for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 29fea7e. Closing this PR as the changes are now in the main branch. |
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
After running
adk deploy cloud_runon Windows, error occurres: [WinError 2] The system cannot find the file specifiedSolution:
On Windows we need to pass the whole script name ->
gcloud.cmdforsubprocess.runto find and execute it.Testing Plan
I run unit tests and I managed to successfully deploy to cloud run on Windows platform.
Unit Tests:
Please include a summary of passed
pytestresults.Manual End-to-End (E2E) Tests:
Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.
Checklist
Additional context
Add any other context or screenshots about the feature request here.
This screenshot shows logs confirming that the default project was correctly obtained. It was also affected by this issue.
