Skip to content

Bump Java to 21 (temurin) in CI workflows#805

Merged
Reedyuk merged 2 commits intomasterfrom
copilot/update-java-version-to-21
Mar 13, 2026
Merged

Bump Java to 21 (temurin) in CI workflows#805
Reedyuk merged 2 commits intomasterfrom
copilot/update-java-version-to-21

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

firebase-tools now requires JDK 21+, causing CI failures with the previously configured JDK 17.

Changes

  • .github/actions/setup_test_action/action.yml — Switch from zulu@17temurin@21; bump actions/setup-java v4 → v5
  • .github/workflows/pull_request.yml — Same update for the jobMatrixSetup job's JDK setup step
- name: Set up JDK
  uses: actions/setup-java@v5
  with:
    distribution: 'temurin'
    java-version: '21'
    cache: gradle
Original prompt

Update the GitHub Actions workflow configuration in .github/workflows/pull_request.yml to ensure that Java 21 or later is used. Replace any existing Java setup steps (such as actions/setup-java) to set up JDK 21 with a well-supported distribution like 'temurin'. Verify that the updated configuration will be compatible with firebase-tools, as it now requires Java 21 or higher.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The job failed because firebase-tools no longer supports Java versions earlier than 21. The logs show the following error:

Error: firebase-tools no longer supports Java version before 21. Please install a JDK at version 21 or above to get a compatible runtime.

Solution:

  • Update your CI workflow configuration to use JDK 21 or later.

If you’re using actions/setup-java in your workflow, update the version like this:

- name: Set up JDK 21
  uses: actions/setup-java@v4
  with:
    java-version: '21'
    distribution: 'temurin'

If you're selecting Java with a different action, ensure the version is set to 21 or above.

Commit this change to your workflow file (.github/workflows/pull_request.yml) and rerun the workflow. This should resolve the failure.

User: can you create a pr with the changes

Assistant: To create a pull request with the necessary update, I need to know whether you want me to update the Java version in .github/workflows/pull_request.yml to use JDK 21 (for example, using actions/setup-java with java-version: '21').

Can you confirm that you want to use JDK 21? If you have a preferred JDK distribution or additional instructions, please specify them. Once confirmed, I'll proceed with creating the PR in GitLiveApp/firebase-kotlin-sdk.

User: yes

Assistant: I've started creating a pull request to update the workflow and set Java 21 in the .github/workflows/pull_request.yml file for firebase-tools compatibility. The PR will ensure your workflow uses a supported JDK version and should resolve the failing job.

This pull request was created from Copilot chat.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: Reedyuk <3853006+Reedyuk@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GitHub Actions to use Java 21 for firebase-tools compatibility Bump Java to 21 (temurin) in CI workflows Mar 13, 2026
Copilot AI requested a review from Reedyuk March 13, 2026 11:54
@Reedyuk Reedyuk marked this pull request as ready for review March 13, 2026 11:55
Copilot AI review requested due to automatic review settings March 13, 2026 11:55
Copy link
Contributor

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

Updates the GitHub Actions CI environment to use a newer Java runtime for pull request testing.

Changes:

  • Switch PR workflow JDK setup from Zulu 17 to Temurin 21.
  • Update the shared composite “Setup Tests” action to use actions/setup-java@v5 and JDK 21.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pull_request.yml Updates the PR CI workflow to run matrix setup on Temurin JDK 21.
.github/actions/setup_test_action/action.yml Updates the shared test setup composite action to use setup-java@v5 and Temurin JDK 21.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 26 to 31
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
distribution: 'temurin'
java-version: '21'
cache: gradle
Comment on lines 7 to 12
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
distribution: 'temurin'
java-version: '21'
cache: gradle
@Reedyuk Reedyuk merged commit c8bd966 into master Mar 13, 2026
74 checks passed
@Reedyuk Reedyuk deleted the copilot/update-java-version-to-21 branch March 13, 2026 13:45
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.

3 participants