Skip to content

Add workflow generator option for installing Java #3036

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

Merged
merged 2 commits into from
Aug 15, 2025
Merged

Add workflow generator option for installing Java #3036

merged 2 commits into from
Aug 15, 2025

Conversation

mbg
Copy link
Member

@mbg mbg commented Aug 15, 2025

Gradle 9 is now the default version of Gradle on the GHA runners. This seems to cause failures because JDK 8 is the default and Gradle 9 requires JDK 17.

This PR adds a new installJava option to the sync.py script which behaves exactly the same as installGo, except for setup-java.

I have added installJava: "true" to the two workflows we have seen fail.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg changed the title Install Java 17 in prepare-test action Add workflow generator option for installing Java Aug 15, 2025
@mbg mbg marked this pull request as ready for review August 15, 2025 17:03
@mbg mbg requested a review from a team as a code owner August 15, 2025 17:03
@mbg mbg requested review from Copilot and henrymercer and removed request for a team August 15, 2025 17:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Java installation capability to the workflow generator to address Gradle 9 compatibility issues with JDK 8. The new installJava option allows workflows to automatically install JDK 17, which is required for Gradle 9.

  • Adds installJava configuration option to the sync.py script that mirrors the existing installGo functionality
  • Enables Java 17 installation for two autobuild direct tracing workflows that were failing with Gradle 9
  • Generates workflow inputs and setup-java action steps when installJava: "true" is specified

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pr-checks/sync.py Core implementation of the installJava option with Java 17 default and Temurin distribution
pr-checks/checks/autobuild-direct-tracing.yml Enables Java installation for autobuild direct tracing workflow
pr-checks/checks/autobuild-direct-tracing-with-working-dir.yml Enables Java installation for autobuild direct tracing with working directory workflow
.github/workflows/__autobuild-direct-tracing.yml Generated workflow with Java installation steps and inputs
.github/workflows/__autobuild-direct-tracing-with-working-dir.yml Generated workflow with Java installation steps and inputs

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

henrymercer
henrymercer previously approved these changes Aug 15, 2025
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

CCR is correct, otherwise LGTM!

@mbg mbg enabled auto-merge August 15, 2025 17:12
@mbg mbg merged commit 4ff91f1 into main Aug 15, 2025
284 checks passed
@mbg mbg deleted the mbg/ci/gradle9 branch August 15, 2025 17:25
@github-actions github-actions bot mentioned this pull request Aug 18, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants