Skip to content

Only pull license for selected tests and publishing container#37827

Merged
Abacn merged 1 commit intoapache:masterfrom
Abacn:skip-pull-license
Mar 11, 2026
Merged

Only pull license for selected tests and publishing container#37827
Abacn merged 1 commit intoapache:masterfrom
Abacn:skip-pull-license

Conversation

@Abacn
Copy link
Contributor

@Abacn Abacn commented Mar 11, 2026

Please add a meaningful description for your change here

Apparently GitHub might have throttled / denylisted self-hosted GitHub Action runner

This should bring most PreCommit/PostCommit that building container back to green


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
Contributor

Summary of Changes

Hello, 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 optimizes the process of pulling licenses within the CI/CD pipeline by making license fetching more targeted and efficient. It adjusts a GitHub Action to only trigger license pulling for specific scenarios, such as selected tests and publishing containers, rather than as a default for all Gradle commands. Additionally, it reduces the number of retry attempts for network-dependent license fetching, aiming to improve build times and potentially mitigate issues related to network throttling or temporary service unavailability.

Highlights

  • Gradle Action Configuration: The gradle-command-self-hosted-action has been updated to remove the -Pdocker-pull-licenses property from its default gradlew command execution. This change ensures that license pulling is no longer universally applied to all Gradle commands run by this action, making it conditional for specific contexts.
  • License Pulling Retry Logic: The Python script pull_licenses_py.py has been modified to reduce the number of retry attempts for pulling licenses from URLs. The stop_after_attempt parameter in the @retry decorator was changed from 10 to 8.

🧠 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
  • .github/actions/gradle-command-self-hosted-action/action.yml
    • Removed the -Pdocker-pull-licenses property from the gradlew command.
  • sdks/python/container/license_scripts/pull_licenses_py.py
    • Reduced the stop_after_attempt value in the @retry decorator from 10 to 8.
Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/beam_PreCommit_GoPortable.yml
    • .github/workflows/beam_PreCommit_Java_Examples_Dataflow.yml
    • .github/workflows/beam_PreCommit_Java_Examples_Dataflow_Java21.yml
    • .github/workflows/beam_PreCommit_PythonDocker.yml
    • .github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
    • .github/workflows/beam_Publish_Docker_Snapshots.yml
Activity
  • No specific human activity (comments, reviews, progress updates) was found in the provided context beyond the initial PR description and automated checks.
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.

@Abacn
Copy link
Contributor Author

Abacn commented Mar 11, 2026

Release candidates explicitly set the flag:

run: ./gradlew ${{ matrix.images_to_publish.gradle_task }} -PisRelease -Pdocker-pull-licenses -Pprune-images ${{ matrix.images_to_publish.include_skip_flags }} -Pdocker-tag=${{ github.event.inputs.RELEASE }}rc${{ github.event.inputs.RC }} --no-daemon --no-parallel

and it's also enabled when -PisRelease set:

'pull_licenses': project.rootProject.hasProperty("docker-pull-licenses") ||

project.rootProject.hasProperty(["isRelease"])])

project.rootProject.hasProperty(["isRelease"])])

etc

@@ -75,7 +75,7 @@ def copy_license_files(dep):
@retry(
reraise=True,
wait=wait_exponential(multiplier=2),
stop=stop_after_attempt(10))
stop=stop_after_attempt(8))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

2^(10-1)=8.5 minutes wait, effectively causing workflow timeout. Not quite useful at this point.

@Abacn
Copy link
Contributor Author

Abacn commented Mar 11, 2026

R: @tvalentyn @claudevdm

@github-actions
Copy link
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

@Abacn
Copy link
Contributor Author

Abacn commented Mar 11, 2026

Merging to mitigate traffic of license pull, as https://github.com/apache/beam/actions/runs/22961218532/job/66652090517?pr=37827 is green.

The change isn't effective on PR run.

@Abacn Abacn merged commit 9d73d76 into apache:master Mar 11, 2026
84 of 93 checks passed
@Abacn Abacn deleted the skip-pull-license branch March 11, 2026 16:21
@Abacn
Copy link
Contributor Author

Abacn commented Mar 11, 2026

Merged and monitoring test status

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.

2 participants