Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: use Java 21 for building pgjdbc by default#3612

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vlsi merged 1 commit intopgjdbc:masterfromvlsi:build_jdk21
May 1, 2025

Conversation

vlsi
Copy link
Member

Note: the resulting binaries still target Java 8, so the change should not be use-visible.

However, we would use a newer toolset which should result in fewer bugs in the generated binaries.

@vlsi
Copy link
MemberAuthor

I think we should be good to go for Java 21 for spawning the build. Looks like the CI succeeds, so we are good to go.
Any objections on merging this?

jorsol and davecramer reacted with thumbs up emoji

@sehrope
Copy link
Member

LGTM.

For anybody else reading this, we're going from 17 to 21 (which like 17 is an LTS release) for the build itself. Testing etc still happens on multiple JDK versions including 8 and none of this changes any of that.

@vlsivlsiforce-pushed thebuild_jdk21 branch 2 times, most recently from18fa7bd tof68a77dCompareApril 29, 2025 14:11
appveyor.yml Outdated
Comment on lines 55 to 80
-psql -U postgres -c "CREATE LANGUAGE plpgsql" test
-psql -U postgres -c "CREATE EXTENSION hstore" test
-psql -U postgres -c "CREATE EXTENSION sslinfo" postgres
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have to change anything for this when we're only updating the JDK version?

Copy link
Member

Choose a reason for hiding this comment

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

Oh wait, is this because appveyor was completely broken before and now it might actually work?

@vlsi
Copy link
MemberAuthor

interestingly, ChatGPT figured out thatwal_keep_segments configuration option was deprecated since PG 13, so it could be a reason for the failure when starting PostgreSQL 15/16 at AppVeyor:https://chatgpt.com/share/6810e0e1-9038-800f-acde-02e785eb28d1

sehrope reacted with eyes emoji

@sehrope
Copy link
Member

That's awesome. Looks like it's mostly working too.

I see some errors for the auth test. Feels like this appveyor stuff has been broken forever that I don't think whatever we did to the GHA environment to work was ever done there too (the explicit stuff in HBA to test the different auth types). If it's going to be annoying to get it to work, maybe just disable those tests on appveyor.

@vlsi
Copy link
MemberAuthor

There are still two failures, and I don't understand why the tests expect certain output values:

Here we fail to authenticate. Did we get the user right? Should it be pre-created when creating the DB? Should the DB be preconfigured somehow? I'm a bit lost here.

FAILURE   0.2sec, org.postgresql.test.util.PasswordUtilTest > mD5()    java.lang.RuntimeException: Failed to authenticate using supplied user and password        at org.postgresql.test.util.PasswordUtilTest.assertValidUsernamePassword(PasswordUtilTest.java:44)        at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:79)        at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:110)        at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:125)        at org.postgresql.test.util.PasswordUtilTest.mD5(PasswordUtilTest.java:152)        Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "test_password_md5cb54c42fe0974f50"            at app//org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:745)            at app//org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:234)            at app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:289)            at app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57)            at app//org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:277)            at app//org.postgresql.Driver.makeConnection(Driver.java:448)            at app//org.postgresql.Driver.connect(Driver.java:298)            at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:683)            at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:191)            at app//org.postgresql.test.TestUtil.openDB(TestUtil.java:401)            at app//org.postgresql.test.util.PasswordUtilTest.assertValidUsernamePassword(PasswordUtilTest.java:40)            ... 4 more

We get "The authentication type should match ==> expected: <MD5_PASSWORD> but was: ", however, it is hard to understand why exactly something should be MD5.

FAILURE   0.2sec, org.postgresql.test.plugin.AuthenticationPluginTest > authPluginMD5()    org.opentest4j.AssertionFailedError: The authentication type should match ==> expected: <MD5_PASSWORD> but was: <SASL>        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)        at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)        at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1156)        at app//org.postgresql.test.plugin.AuthenticationPluginTest.lambda$testAuthPlugin$0(AuthenticationPluginTest.java:55)        at app//org.postgresql.test.plugin.AuthenticationPluginTest$DummyAuthenticationPlugin.getPassword(AuthenticationPluginTest.java:38)        at app//org.postgresql.core.v3.AuthenticationPluginManager.withPassword(AuthenticationPluginManager.java:78)        at app//org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:886)        at app//org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:234)        at app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:289)        at app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57)        at app//org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:277)        at app//org.postgresql.Driver.makeConnection(Driver.java:448)        at app//org.postgresql.Driver.connect(Driver.java:298)        at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:683)        at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:191)        at app//org.postgresql.test.TestUtil.openDB(TestUtil.java:401)        at app//org.postgresql.test.plugin.AuthenticationPluginTest.testAuthPlugin(AuthenticationPluginTest.java:57)        at app//org.postgresql.test.plugin.AuthenticationPluginTest.authPluginMD5(AuthenticationPluginTest.java:67)

@davecramer
Copy link
Member

There are still two failures, and I don't understand why the tests expect certain output values:

Here we fail to authenticate. Did we get the user right? Should it be pre-created when creating the DB? Should the DB be preconfigured somehow? I'm a bit lost here.
Yes postgresql.conf has to have#password_encryption = scram-sha-256 # scram-sha-256 or md5 set tomd5 for this to work.

by default the password_encryption will be set to scram-sha-256. I'd vote for dumping the md5 test

Dave

@vlsivlsiforce-pushed thebuild_jdk21 branch 6 times, most recently fromf28858e to743dac2CompareApril 30, 2025 09:10

# Customize pg_hba.conf
local pg_hba="/home/certdir/pg_hba.conf"
sed -i's/127.0.0.1\/32/0.0.0.0\/0/g'"${pg_hba}"
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm not sure what was the reason to have127.0.0.1/32 in the sourcepg_hba.conf file and replace it with0.0.0.0/0 later, so I replaced the value with the basepg_hba.conf file so we don't need to replace them. At the same time, I replaced0.0.0.0/0 withall to support bothipv4 andipv6 ips.

@vlsivlsiforce-pushed thebuild_jdk21 branch 10 times, most recently from453e9ff toeb72cc3CompareApril 30, 2025 12:01
@davecramer
Copy link
Member

I commend your persistence here

@vlsi
Copy link
MemberAuthor

Even though I managed to get bothPG 11 and 16 tested at AppVeyor, I leave just 16 as each test run takes ~20 minutes, so waiting both is way too long

davecramer reacted with thumbs up emoji

Note: the resulting binaries still target Java 8, so the change should notbe use-visible.However, we would use a newer toolset which should result in fewer bugs inthe generated binaries.wal_keep_segments is deprecated since PostgreSQL 13, so remove it from appveyor.yaml
@vlsivlsi added the chore labelMay 1, 2025
@vlsivlsi merged commit4d273f1 intopgjdbc:masterMay 1, 2025
18 of 19 checks passed
@davecramer
Copy link
Member

Good work!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sehropesehropesehrope left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vlsi@sehrope@davecramer

[8]ページ先頭

©2009-2025 Movatter.jp