Skip to content

Conversation

parthea
Copy link
Collaborator

@parthea parthea commented Oct 7, 2025

Similar to #12780

@parthea parthea requested review from a team as code owners October 7, 2025 19:32
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Oct 7, 2025
Copy link
Contributor

Summary of Changes

Hello @parthea, 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 updates the .kokoro/docker/Dockerfile to incorporate Python 3.14.0 into the samples testing image. This enhancement ensures that the testing infrastructure is prepared for the latest Python release and benefits from updated patch versions for several other Python versions, thereby improving the robustness and currency of the test environment.

Highlights

  • Python 3.14 Support: Added Python 3.14.0 to the list of Python versions installed and tested within the samples testing Docker image.
  • Python Patch Version Updates: Updated the patch versions for several existing Python releases, including 3.9.23, 3.10.18, 3.11.13, 3.12.11, and 3.13.8, ensuring the testing environment uses more recent stable releases.
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 updates the Python versions in the testing Docker image, adding support for Python 3.14 and refreshing patch versions for others. My feedback focuses on improving the readability and maintainability of the Dockerfile where these versions are listed.

&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& /tmp/fetch_gpg_keys.sh \
&& for PYTHON_VERSION in 2.7.18 3.7.17 3.8.20 3.9.20 3.10.15 3.11.10 3.12.7 3.13.0; do \
&& for PYTHON_VERSION in 2.7.18 3.7.17 3.8.20 3.9.23 3.10.18 3.11.13 3.12.11 3.13.8 3.14.0; do \
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This list of Python versions is getting long and hard to read on a single line. To improve readability and maintainability, I suggest extracting the versions into a shell variable. This makes the list much easier to manage for future updates.

  && PYTHON_VERSIONS="\
    2.7.18 \
    3.7.17 \
    3.8.20 \
    3.9.23 \
    3.10.18 \
    3.11.13 \
    3.12.11 \
    3.13.8 \
    3.14.0" \
  && for PYTHON_VERSION in $PYTHON_VERSIONS; do \

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in d92eb95

Copy link
Contributor

@vchudnov-g vchudnov-g left a comment

Choose a reason for hiding this comment

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

One small suggestion

3.12.11 \
3.13.8 \
3.14.0" \
&& for PYTHON_VERSION in $PYTHON_VERSIONS; do \
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to avoid variables that differ only by one letter. How about
for VERSION in $PYTHON_VERSIONS or for PYTHON_VERSION in $ALL_PYTHON_VERSIONS?

&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& /tmp/fetch_gpg_keys.sh \
&& PYTHON_VERSIONS="\
2.7.18 \
Copy link
Contributor

Choose a reason for hiding this comment

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

This commit removes Python 2.7 entirely from the base image. Will this affect CI?

Per an earlier update, #13066 (comment) indicates this was going to be removed, but it's still an active check on this PR. I also recall an earlier PR (can't find it now) where removing Python 2.7 breaks kokoro. Was that resolved? I'm cautious of an update that adds a new python version but also coincidently removes an older major version.

@glasnt
Copy link
Contributor

glasnt commented Oct 15, 2025

Guessing based on #12780 that we can't test the new image works until after this PR is merged and new changes come in?

I'm also guessing that the changes to this Docker image aren't tested until after this PR is merged and the image is rebuilt? (Automatically via a Cloud Build trigger, by the look of it).

Is there a manual way to test that the Dockerfile changes work before merging the PR?

(The failing tests here appear to all be related to individual tests not working, which I will begin addressing separetely.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants