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

chore: use Java 17 for building pgjdbc, and use --release 8 to target Java 8, add tests with Java 21 and 22 #3026

Merged
merged 1 commit into from Nov 27, 2023

Conversation

vlsi
Copy link
Member

@vlsi vlsi commented Nov 25, 2023

After this PR we will always use a recent JDK for building pgjdbc (e.g. a recent javac), and we will use toolchains to separate the build JDK from the test JDK.

For now, we will use Java 17 for building pgjdbc, and we could bump to Java 21 as Gradle 8.5 releases.

Fixes #3014

Workarounds applied

Issues so far

@vlsi vlsi added this to the 42.7.1 milestone Nov 25, 2023
@davecramer
Copy link
Member

strange errors?

@vlsi
Copy link
Member Author

vlsi commented Nov 25, 2023

Will fix tomorrow

@vlsi
Copy link
Member Author

vlsi commented Nov 26, 2023

Copr build fails as it is currently hard-coded to java-11 (see

java-11-openjdk-devel
)

Does anybody know how to re-initialize Copr jobs so it selects java-17 (and eventually java-21)?
It looks like it is not enough to change copr-setup in github.com/pgjdbc/pgjdbc

@vlsi
Copy link
Member Author

vlsi commented Nov 26, 2023

@kubco2, @praiskup , could you please help with updating Copr builds scripts for pgjdbc?
It looks like the scripts from https://github.com/pgjdbc/pgjdbc/tree/master/packaging/rpm/setup-copr are not used during Copr build (at least Copr does not pick up the modifications).

I would like to bump the required Java to 17 (e.g. java-11-openjdk-devel in build_deps).
Does it mean setup-copr/build-script and setup-copr/copr-setup are stored somewhere at Copr servers?

@vlsi vlsi force-pushed the build_jdk branch 5 times, most recently from 91fae0a to 1c8e3d3 Compare November 27, 2023 07:01
@praiskup
Copy link
Member

Thank you for the ping, @vlsi

@kubco2, @praiskup , could you please help with updating Copr builds scripts for pgjdbc?
It looks like the scripts from https://github.com/pgjdbc/pgjdbc/tree/master/packaging/rpm/setup-copr are not used during Copr build (at least Copr does not pick up the modifications).

Indeed, these exist just to make the Copr configuration more convenient... but somebody needs to execute them manually. And since the build is passing now, you probably managed to do so. Is that correct?

@hhorak fyi

@vlsi vlsi force-pushed the build_jdk branch 4 times, most recently from 38052df to d5a4154 Compare November 27, 2023 08:19
@vlsi
Copy link
Member Author

vlsi commented Nov 27, 2023

And since the build is passing now, you probably managed to do so. Is that correct?

Well, I went with a workaround at pgjdbc side: I detect COPR_OWNER environment variable and I reconfigure build scripts to use Java 11 by default then.

I would like to update COPR configuration to use java-17 as java-11 is quite old now.

somebody needs to execute them manually

Ok, now I get it. ./copr-setup configures settings which are later used for PR builds.
Would you please configure it to have "java-17-openjdk-devel"?
I don't have copr-cli and it is not clear how would I install one on a macOS machine.

@praiskup
Copy link
Member

Would you please configure it to have "java-17-openjdk-devel"?

Done. See #3036.

@vlsi vlsi changed the title chore: use Java 17 for building pgjdbc, and use --release 8 to target Java 8 chore: use Java 17 for building pgjdbc, and use --release 8 to target Java 8, add tests with Java 21 and 22 Nov 27, 2023
… Java 8, add tests with Java 21 and 22

Now we will always use a recent JDK for building pgjdbc (e.g. a recent javac),
and we will use toolchains to separate build JDK from test JDK.

Fixes pgjdbc#3014
@vlsi vlsi merged commit 3a5f185 into pgjdbc:master Nov 27, 2023
13 of 15 checks passed
redalogobject pushed a commit to logobject/pgjdbc that referenced this pull request Dec 7, 2023
… Java 8, add tests with Java 21 and 22 (pgjdbc#3026)

Now we will always use a recent JDK for building pgjdbc (e.g. a recent javac),
and we will use toolchains to separate build JDK from test JDK.

Fixes pgjdbc#3014
davecramer pushed a commit to davecramer/pgjdbc that referenced this pull request Mar 8, 2024
… Java 8, add tests with Java 21 and 22 (pgjdbc#3026)

Now we will always use a recent JDK for building pgjdbc (e.g. a recent javac),
and we will use toolchains to separate build JDK from test JDK.

Fixes pgjdbc#3014
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.

NoSuchMethodError on ByteBuffer#position When Running on Java 8
3 participants