Skip to content

chore(deps): update openjdk docker tag to v11 - autoclosed #13379

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

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
openjdk stage major 8-jre-slim -> 11.0.16-jre-slim

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners May 19, 2025 04:58
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 19, 2025
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label May 19, 2025
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.

Hello @renovate-bot, 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!

Summary of Changes

Hello! Gemini, your friendly code-assist bot, is here to provide a summary of this pull request. This PR, authored by renovate-bot, aims to update the version of OpenJDK used in the dataflow/snippets/Dockerfile. Specifically, it proposes upgrading the base image for copying the JRE from OpenJDK 8 to OpenJDK 11. This is a routine dependency update managed by Renovate to keep the project's dependencies current.

Highlights

  • Dependency Update: The primary goal of this PR is to update the OpenJDK dependency used within a Dockerfile.
  • OpenJDK Version Bump: The update changes the OpenJDK version from 8-jre-slim to 11.0.16-jre-slim.
  • Dockerfile Change: The change is confined to a single line in the dataflow/snippets/Dockerfile.

Changelog

  • dataflow/snippets/Dockerfile
    • Updated the COPY --from instruction to use the openjdk:11.0.16-jre-slim image tag instead of openjdk:8-jre-slim (Line 24).
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


Old Java eight, now gone,
Eleven steps onto the stage,
Docker builds move on.

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.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 19, 2025
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, generated by Mend Renovate, aims to update the OpenJDK version used in the Dockerfile from 8 to 11. While updating dependencies is generally good, there's a critical issue with how the JRE is being copied from the new base image, and a related maintainability concern with the destination path.

Summary of Findings

  • Incorrect JRE source path in Dockerfile: The COPY command in dataflow/snippets/Dockerfile (line 24) uses /usr/local/openjdk-8 as the source path for JRE files from the openjdk:11.0.16-jre-slim image. This is likely incorrect, as OpenJDK 11 images typically store JRE files at /usr/local/openjdk-11. This could result in the JRE not being installed, which is a critical issue.
  • Misleading JRE destination path in Dockerfile: The COPY command (line 24) installs Java 11 into a directory named /usr/local/openjdk-8. This is misleading and inconsistent. For better maintainability, the destination path should reflect the Java version (e.g., /usr/local/openjdk-11). This would also require updates to JAVA_HOME (line 25) and update-alternatives (line 26).

Merge Readiness

This pull request has a critical issue regarding the JRE installation path in the Dockerfile. The source path for copying the JRE from the openjdk:11.0.16-jre-slim image appears to be incorrect, which could lead to a broken JRE setup. Additionally, the destination path is misleading.

I recommend that these issues, particularly the critical source path error, be addressed before merging. The suggested code change for line 24 should resolve the immediate problem on that line, but related changes to JAVA_HOME and update-alternatives on subsequent lines (not in this diff) should also be considered for full consistency.

As an AI reviewer, I am not authorized to approve pull requests. Please ensure further review and approval by authorized maintainers after addressing the identified issues.

@@ -21,7 +21,7 @@
FROM python:3.12-slim

# Install JRE
COPY --from=openjdk:8-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
COPY --from=openjdk:11.0.16-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

There are a couple of concerns with this line:

  1. (Critical) Is /usr/local/openjdk-8 the correct source path for JRE 11 files within the openjdk:11.0.16-jre-slim image? The JAVA_HOME (and thus the typical installation path) for openjdk:11.0.16-jre-slim is /usr/local/openjdk-11. If /usr/local/openjdk-8 does not exist or does not contain the JRE in the source image, this COPY command will fail to install Java correctly, potentially leading to runtime errors for applications depending on JRE.

  2. (Medium) Using /usr/local/openjdk-8 as the destination path for Java 11 is misleading and harms maintainability. It would be clearer to use a path that reflects the actual Java version being installed, such as /usr/local/openjdk-11.

If the destination path is updated to /usr/local/openjdk-11, please also ensure that JAVA_HOME on line 25 and the path in the update-alternatives command on line 26 are updated accordingly to /usr/local/openjdk-11 for consistency. (These lines are not part of the current diff, so they would need to be changed separately.)

I suggest updating this line to use the correct source path for Java 11 and a version-appropriate destination path.

COPY --from=openjdk:11.0.16-jre-slim /usr/local/openjdk-11 /usr/local/openjdk-11

@renovate-bot renovate-bot changed the title chore(deps): update openjdk docker tag to v11 chore(deps): update openjdk docker tag to v11 - autoclosed May 19, 2025
@renovate-bot renovate-bot deleted the renovate/openjdk-11.x branch May 19, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants