Skip to content

Add google-cloud-secret-managager to beam python container deps - #36353

Merged
tvalentyn merged 1 commit into
apache:masterfrom
tvalentyn:deps2
Oct 2, 2025
Merged

Add google-cloud-secret-managager to beam python container deps#36353
tvalentyn merged 1 commit into
apache:masterfrom
tvalentyn:deps2

Conversation

@tvalentyn

@tvalentyn tvalentyn commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Update Beam container deps.

google-cloud-secret-manager==2.24.0 is an apache beam 'extra' dependency, and pip check doesn't detect that it wasn't installed in https://github.com/apache/beam/blob/340d420c2d315a4cb9ec419606356a109b867d3d/sdks/python/container/Dockerfile#L75C1-L76C1

Full dependency upgrade to be done with the GHA job that was recently fixed: #30518


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @tvalentyn, 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 dependency lists for Apache Beam's Python container images. By including the google-cloud-secret-manager library, it ensures that Beam pipelines running within these containers have native support for securely accessing and managing secrets stored in Google Cloud Secret Manager, enhancing security and operational flexibility for Beam users.

Highlights

  • Dependency Update: The google-cloud-secret-manager Python client library (version 2.24.0) has been added to the base image requirements for Apache Beam's Python containers across multiple Python versions (3.9, 3.10, 3.11, 3.12, and 3.13).
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.

@tvalentyn

Copy link
Copy Markdown
Contributor Author

R: @tarun-google @damccorm

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@tarun-google

Copy link
Copy Markdown
Contributor

LGTM

@tarun-google

Copy link
Copy Markdown
Contributor

For Longterm:

Checking the workflow. There is some gap between the update_python_dependencies.yml workflow and this manual process which we need to do for imports.

  1. Workflow explicitly do not update these dependencies until beam release is done. Which is not happening often.
  2. But We need these dependencies to build containers for import daily. So, we end up adding them any way?

In this scenario i think we should bridge the gap

  1. Auto generate and merge these dependencies every time there is a PR merged to change target files. Anyway we do not create images till release.
  2. OR simple, we need to add this process in imports duty so every one is aware of this manual process requirement.

@damccorm damccorm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@tvalentyn

Copy link
Copy Markdown
Contributor Author

When we add a new dependency, we should either regenerate the files or manually add it. Beam test suites were supposed to enforce this but it turns out pip check doesn't fail when 'extra' dependency is not installed. At least this is enforced during internal imports.

We regenerate the deps after the release because we want to periodically update dependencies anyway, and want to have some lead time before a release cut to detect possible regressions caused by a dependency update.

I think recently there were suggestions to do regular dependency update more frequently.

@tvalentyn
tvalentyn merged commit 666c75a into apache:master Oct 2, 2025
93 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Update Python Depedencies job is flaky

3 participants