Skip to content
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

Upgrade build to be compatible with JDK17 #24677

Merged
merged 2 commits into from
Mar 7, 2025
Merged

Upgrade build to be compatible with JDK17 #24677

merged 2 commits into from
Mar 7, 2025

Conversation

aaneja
Copy link
Contributor

@aaneja aaneja commented Mar 5, 2025

Co-authored-by: Zac Blanco zac@ibm.com
Co-authored-by: Jalpreet Singh Nanda (:imjalpreet) jalpreetnanda@gmail.com

Description

Upgrade build to be compatible with JDK17 while still retaining support for JDK 8

Motivation and Context

https://github.com/prestodb/rfcs/blob/main/RFC-0010-jdk-upgrade.md

Impact

None

Test Plan

CI

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== RELEASE NOTES ==

General Changes
* Add support to build Presto with JDK 17

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Mar 5, 2025
@aaneja aaneja changed the title [DRAFT] Upgrade build to be compatible with JDK17 Upgrade build to be compatible with JDK17 Mar 5, 2025
@aaneja aaneja marked this pull request as ready for review March 5, 2025 17:56
@aaneja aaneja requested a review from presto-oss March 5, 2025 17:56
@prestodb-ci prestodb-ci requested review from a team and nishithakbhaskaran and removed request for a team March 5, 2025 17:56
@@ -1,42 +0,0 @@
name: cleanup
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC This was causing issues with the matrix builds because it was cancelling already in-progress actions. We removed it so we could get both versions testing. That action is actually deprecated and we should migrate off of it: https://github.com/n1hility/cancel-previous-runs?tab=readme-ov-file#note-this-action-was-created-before-concurrency-groups-in-most-cases-you-want-to-define-a-cancel-in-progress-group-instead-of-using-this-action

Also, the CI matrix is actually something we wanted to bring up at the TSC because we weren't sure how folks might feel about resource requirements and turnaround time on PRs when we almost double the number of actions per PR by running tests on both versions.

Co-authored-by: Zac Blanco <zac@ibm.com>
Co-authored-by: Jalpreet Singh Nanda (:imjalpreet) <jalpreetnanda@gmail.com>
@ZacBlanco ZacBlanco force-pushed the upgradeJava17 branch 2 times, most recently from fb1cf19 to 43475ad Compare March 5, 2025 18:57
along with existing support for JDK 8

Co-authored-by: Zac Blanco <zac@ibm.com>
Co-authored-by: Jalpreet Singh Nanda (:imjalpreet) <jalpreetnanda@gmail.com>
@rschlussel
Copy link
Contributor

Thanks for this! All the main code looks good. 34 tests (not-matrixed versions of the other tests, so probably shouldn't be running at all?) seem to be stuck.

@ZacBlanco
Copy link
Contributor

I think the 34 "stuck" tests are a product of the repository configuration's existing branch protection rules. Since they are marked as required in the repository configuration, it shows them in the list here. The original checks will of course not run because we modified the GitHub actions CI to use a matrix so the names of the checks have changed. It seems the branch protection rules only look for the names of the checks

These are the two options on how to proceed around the CI:

  1. Update branch protection rules to match the java 8 and 17 versions of required checks based on this PR after we merge it (overriding current branch protection rules).
  2. Revert the changes to the CI in this PR in order to get status checks all passing. Re-introduce them at a later time after discussion of which java 17 checks are necessary to run on every PR and update branch protection rules accordingly

@rschlussel
Copy link
Contributor

either is okay with me. My instinct is to merge as is, and if we find the 2x checks are too onerous we can choose which ones to remove. Do you have a preference?

@ZacBlanco
Copy link
Contributor

I would prefer to have the 17 checks run and then reduce from there if necessary. If we merge this will you be able to update branch protection rules?

@rschlussel
Copy link
Contributor

yeah, I can update. It's a very manual process with a weird UI, so i may miss some. if you notice anything wrong, just tag me to fix it.

@rschlussel rschlussel merged commit a3843f6 into master Mar 7, 2025
92 checks passed
@rschlussel rschlussel deleted the upgradeJava17 branch March 7, 2025 16:43
@@ -31,12 +31,16 @@ jobs:
- '!presto-docs/**'

hive-tests:
strategy:
fail-fast: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we want to force the build for the other java version if one of them fails?

Copy link
Contributor

@ZacBlanco ZacBlanco Mar 7, 2025

Choose a reason for hiding this comment

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

short offline discussion: we disabled fail-fast initially during our testing so that we could view all the errors for both 8 & 17 builds. This shouldn't be required any more though. Will create a follow-up PR to remove fail-fast (the default is true)

@rschlussel
Copy link
Contributor

required tests should all be updated now. #24689 tests look as expected.

@ZacBlanco
Copy link
Contributor

Great, thank you @rschlussel !

@rschlussel
Copy link
Contributor

One more thing: I noticed the arrow flight tests don't use a matrix (e.g. https://github.com/prestodb/presto/actions/runs/13725273780/job/38390098449?pr=24689)

@ZacBlanco
Copy link
Contributor

I will add the matrix to the arrow-flight tests in this follow up PR for the actions #24690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants