Skip to content

Commit 979f8b1

Browse files
authored
Merge branch 'main' into HHH-19558
2 parents 554f6c0 + f90e97e commit 979f8b1

File tree

1,363 files changed

+7886
-8506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,363 files changed

+7886
-8506
lines changed

.github/dependabot.yml

Lines changed: 125 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ registries:
66
username: dummy # Required by dependabot
77
password: dummy # Required by dependabot
88
updates:
9-
- package-ecosystem: "gradle"
10-
directory: "/"
11-
allow:
12-
- dependency-name: "com.gradle*"
13-
registries:
14-
- gradle-plugin-portal
15-
schedule:
16-
interval: "weekly"
179
- package-ecosystem: github-actions
1810
directory: "/"
1911
schedule:
@@ -25,3 +17,128 @@ updates:
2517
allow:
2618
- dependency-name: "actions/*"
2719
- dependency-name: "redhat-actions/*"
20+
- package-ecosystem: "gradle"
21+
directory: "/"
22+
registries:
23+
- gradle-plugin-portal
24+
schedule:
25+
interval: "weekly"
26+
day: "wednesday"
27+
open-pull-requests-limit: 20
28+
groups:
29+
# These are used in tooling we publish (Gradle, Ant, Maven plugins)
30+
# and thus must be treated as runtime dependencies,
31+
# which cannot be included in the build-dependencies group below.
32+
tooling-dependencies:
33+
patterns:
34+
# Note: Gradle tooling dependencies seem to be tied to the version of Gradle we use for building.
35+
- "org.apache.ant*"
36+
- "org.apache.maven:maven-plugin-api"
37+
- "org.apache.maven:maven-project"
38+
- "org.apache.maven.shared:file-management"
39+
- "org.apache.maven.plugin-tools:maven-plugin-annotations"
40+
# This group combines all build-only dependencies. Published artifacts do not depend on them.
41+
# Grouping such dependencies will make Dependabot create PRs with a branch name
42+
# following the pattern (`dependabot/maven/build-dependencies-.*`)
43+
# and with a title like `Bump the build-dependencies group with 8 updates` that we can easily
44+
# use for Hibernate Bot rules.
45+
build-dependencies:
46+
patterns:
47+
# Gradle plugins:
48+
- "com.gradle*"
49+
- "org.moditect*"
50+
- "de.thetaphi*"
51+
- "org.gradlex*"
52+
- "org.hibernate.build*"
53+
- "org.hibernate.orm.build*"
54+
- "org.hibernate.orm.database-service*"
55+
- "org.hibernate.orm.antlr*"
56+
- "io.github.gradle-nexus*"
57+
- "biz.aQute.bnd*"
58+
- "org.checkerframework*"
59+
- "org.jetbrains.gradle*"
60+
- "com.dorongold*"
61+
- "org.asciidoctor*"
62+
- "com.diffplug.spotless*"
63+
# Local build plugin dependencies:
64+
- "org.apache.maven*"
65+
- "org.apache.httpcomponents*"
66+
# DB drivers:
67+
- "com.h2database:h2"
68+
- "org.orbisgis:h2gis"
69+
- "org.hsqldb:hsqldb"
70+
- "org.apache.derby*"
71+
- "org.postgresql:*"
72+
- "com.mysql:mysql-connector-j"
73+
- "org.mariadb.jdbc:mariadb-java-client"
74+
- "com.oracle.database.*"
75+
- "com.microsoft.sqlserver:mssql-jdbc"
76+
- "com.ibm.db2:jcc"
77+
- "com.sap.cloud.db.jdbc:ngdbc"
78+
- "net.sourceforge.jtds:jtds"
79+
- "com.ibm.informix:jdbc"
80+
- "org.firebirdsql.jdbc:jaybird"
81+
- "com.altibase:altibase-jdbc"
82+
# Other test dependencies
83+
- "org.apache.groovy:groovy-jsr223" # used for scripting maven plugin
84+
- "org.apache.commons:commons-lang3" # used in hibernate-search-util-common tests
85+
- "org.apache.commons:commons-math3" # used to solve dependency convergence for Wiremock
86+
- "org.openjdk.jmh:*" # performance testing dependency
87+
- "com.google.guava:guava" # Guava is used in our test utils
88+
- "org.asciidoctor:*" # Asciidoctor is used for rendering the documentation
89+
- "org.jboss.marshalling:jboss-marshalling" # JBeret IT dependency
90+
- "org.wildfly.security:wildfly-security-manager" # JBeret IT dependency
91+
- "org.springframework.boot:*" # Spring is only for ITs
92+
- "io.agroal:agroal-spring-boot-starter" # part of Spring dependencies, is only for ITs
93+
- "dev.snowdrop:narayana-spring-boot-starter" # part of Spring dependencies, is only for ITs
94+
- "org.mockito:*"
95+
- "org.hamcrest:*"
96+
- "org.apache.logging.log4j:*"
97+
- "org.assertj:*"
98+
- "org.jsoup:*"
99+
- "org.junit*"
100+
- "org.jboss.weld.se:*"
101+
- "org.jboss.narayana.*:*"
102+
- "org.wildfly.transaction:*"
103+
- "org.jboss:jboss-transaction-spi"
104+
- "org.jboss.shrinkwrap*"
105+
- "org.jboss.byteman*"
106+
hibernate:
107+
patterns:
108+
- "org.hibernate*"
109+
jakarta:
110+
patterns:
111+
- "jakarta.*"
112+
- "org.glassfish*"
113+
- "org.eclipse:yasson"
114+
ignore:
115+
# Avoid non-patch updates for complex dependencies and their implementation, even if we only use them for tests.
116+
- dependency-name: "org.hibernate*"
117+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
118+
- dependency-name: "jakarta.*"
119+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
120+
- dependency-name: "org.jboss.narayana*"
121+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
122+
- dependency-name: "org.jboss.weld*"
123+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
124+
- dependency-name: "org.wildfly*"
125+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
126+
- dependency-name: "org.glassfish*"
127+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
128+
- dependency-name: "org.eclipse:yasson"
129+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
130+
- dependency-name: "org.apache.maven*"
131+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
132+
- dependency-name: "org.apache.ant*"
133+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
134+
# Avoid non-patch updates for JUnit, because it is exposed in hibernate-testing,
135+
# which contains @BytecodeEnhanced, which is very sensitive to internal changes in JUnit.
136+
- dependency-name: "org.junit*"
137+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
138+
# Sticking to SLF4J 1.x for now since later versions require upgrading providers
139+
# (Log4j, ... see https://www.slf4j.org/faq.html#changesInVersion200),
140+
# and also because we only need this dependency for Maven,
141+
# which is currently still on SLF4J 1.x
142+
# (see https://central.sonatype.com/artifact/org.apache.maven/maven-embedder/3.9.9/dependencies)
143+
- dependency-name: "org.slf4j:*"
144+
update-types: ["version-update:semver-major"]

.github/hibernate-github-bot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
jira:
33
projectKey: "HHH"
44
insertLinksInPullRequests: true
5+
ignore:
6+
# See the `build-dependencies` group in Dependabot's configuration file
7+
- user: dependabot[bot]
8+
titlePattern: "Bump.*the (build-dependencies|workflow-actions) group.*+"
59
ignoreFiles:
610
# Git
711
- ".git*"
@@ -63,3 +67,7 @@ develocity:
6367
replacement: "" # Just remove these tags
6468
licenseAgreement:
6569
enabled: true
70+
ignore:
71+
# See the `build-dependencies` group in the Dependabot's configuration file
72+
- user: dependabot[bot]
73+
titlePattern: "Bump.*"

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ name: GH Actions CI
33
on:
44
push:
55
branches:
6+
# Pattern order matters: the last matching inclusion/exclusion wins
67
- 'main'
8+
# We don't want to run CI on branches for dependabot, just on the PR.
9+
- '!dependabot/**'
710
pull_request:
811
branches:
912
- 'main'
13+
# Ignore dependabot PRs that are not just about build dependencies or workflows;
14+
# we'll reject such PRs and send one ourselves.
15+
- '!dependabot/**'
16+
- 'dependabot/maven/build-dependencies-**'
17+
- 'dependabot/github_actions/workflow-actions-**'
1018

1119
permissions: { } # none
1220

Jenkinsfile

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@ stage('Configure') {
4040
// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance
4141
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
4242
new BuildEnvironment( node: 's390x' ),
43-
// We build with JDK 21, but produce Java 17 bytecode, so we test with JDK 17, to be sure everything works.
44-
new BuildEnvironment( testJdkVersion: '17' ),
43+
// We generally build with JDK 21, but our baseline is Java 17, so we test with JDK 17, to be sure everything works.
44+
// Here we even compile the main code with JDK 17, to be sure no JDK 18+ classes are depended on.
45+
new BuildEnvironment( mainJdkVersion: '17', testJdkVersion: '17' ),
4546
// We want to enable preview features when testing newer builds of OpenJDK:
4647
// even if we don't use these features, just enabling them can cause side effects
4748
// and it's useful to test that.
48-
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview', skipJacoco: true ),
49-
new BuildEnvironment( testJdkVersion: '24', testJdkLauncherArgs: '--enable-preview', skipJacoco: true ),
49+
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
50+
new BuildEnvironment( testJdkVersion: '24', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
51+
new BuildEnvironment( testJdkVersion: '25', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
5052
// The following JDKs aren't supported by Hibernate ORM out-of-the box yet:
5153
// they require the use of -Dnet.bytebuddy.experimental=true.
5254
// Make sure to remove that argument as soon as possible
5355
// -- generally that requires upgrading bytebuddy after the JDK goes GA.
54-
new BuildEnvironment( testJdkVersion: '25', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true', skipJacoco: true ),
56+
new BuildEnvironment( testJdkVersion: '26', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true', additionalOptions: '-PskipJacoco=true' )
5557
];
5658

5759
if ( env.CHANGE_ID ) {
@@ -102,13 +104,18 @@ stage('Build') {
102104
Map<String, Map<String, String>> state = [:]
103105
environments.each { BuildEnvironment buildEnv ->
104106
// Don't build environments for newer JDKs when this is a PR, unless the PR is labelled with 'jdk' or 'jdk-<version>'
105-
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion &&
107+
if ( helper.scmSource.pullRequest &&
108+
buildEnv.testJdkVersion && buildEnv.testJdkVersion.toInteger() > DEFAULT_JDK_VERSION.toInteger() &&
106109
!pullRequest.labels.contains( 'jdk' ) && !pullRequest.labels.contains( "jdk-${buildEnv.testJdkVersion}" ) ) {
107110
return
108111
}
109112
state[buildEnv.tag] = [:]
110113
executions.put(buildEnv.tag, {
111114
runBuildOnNode(buildEnv.node ?: NODE_PATTERN_BASE) {
115+
def mainJavaHome
116+
if ( buildEnv.mainJdkVersion ) {
117+
mainJavaHome = tool(name: "OpenJDK ${buildEnv.mainJdkVersion} Latest", type: 'jdk')
118+
}
112119
def testJavaHome
113120
if ( buildEnv.testJdkVersion ) {
114121
testJavaHome = tool(name: "OpenJDK ${buildEnv.testJdkVersion} Latest", type: 'jdk')
@@ -118,9 +125,17 @@ stage('Build') {
118125
// See https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md
119126
withEnv(["JAVA_HOME=${javaHome}", "PATH+JAVA=${javaHome}/bin"]) {
120127
state[buildEnv.tag]['additionalOptions'] = '-PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com'
121-
if ( testJavaHome ) {
128+
if ( buildEnv.mainJdkVersion ) {
129+
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
130+
" -Pmain.jdk.version=${buildEnv.mainJdkVersion}"
131+
}
132+
if ( buildEnv.testJdkVersion ) {
122133
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
123-
" -Ptest.jdk.version=${buildEnv.testJdkVersion} -Porg.gradle.java.installations.paths=${javaHome},${testJavaHome}"
134+
" -Ptest.jdk.version=${buildEnv.testJdkVersion}"
135+
}
136+
if ( buildEnv.mainJdkVersion || buildEnv.testJdkVersion ) {
137+
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
138+
" -Porg.gradle.java.installations.paths=${[javaHome, mainJavaHome, testJavaHome].findAll { it != null }.join(',')}"
124139
}
125140
if ( buildEnv.testJdkLauncherArgs ) {
126141
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
@@ -130,10 +145,6 @@ stage('Build') {
130145
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
131146
" -Pci.node=${buildEnv.node}"
132147
}
133-
if ( buildEnv.skipJacoco ) {
134-
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
135-
" -PskipJacoco=true"
136-
}
137148
state[buildEnv.tag]['containerName'] = null;
138149
stage('Checkout') {
139150
checkout scm
@@ -210,6 +221,7 @@ stage('Build') {
210221
// Job-specific helpers
211222

212223
class BuildEnvironment {
224+
String mainJdkVersion
213225
String testJdkVersion
214226
String testJdkLauncherArgs
215227
String dbName = 'h2'
@@ -219,7 +231,6 @@ class BuildEnvironment {
219231
String additionalOptions
220232
String notificationRecipients
221233
boolean longRunning
222-
boolean skipJacoco
223234

224235
String toString() { getTag() }
225236
String getTag() { "${node ? node + "_" : ''}${testJdkVersion ? 'jdk_' + testJdkVersion + '_' : '' }${dbName}" }

ci/build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/bash
22

33
goal=
4-
if [ "$RDBMS" == "h2" ]; then
4+
if [ "$RDBMS" == "h2" ] || [ "$RDBMS" == "" ]; then
55
# This is the default.
66
goal="preVerifyRelease"
77
# Settings needed for `preVerifyRelease` execution - for asciidoctor doc rendering
@@ -10,7 +10,7 @@ elif [ "$RDBMS" == "hsqldb" ] || [ "$RDBMS" == "hsqldb_2_6" ]; then
1010
goal="-Pdb=hsqldb"
1111
elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_8_0" ]; then
1212
goal="-Pdb=mysql_ci"
13-
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_4" ]; then
13+
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_6" ]; then
1414
goal="-Pdb=mariadb_ci"
1515
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_13" ]; then
1616
goal="-Pdb=pgsql_ci"
@@ -77,6 +77,9 @@ elif [ "$RDBMS" == "altibase" ]; then
7777
goal="-Pdb=altibase"
7878
elif [ "$RDBMS" == "informix" ]; then
7979
goal="-Pdb=informix"
80+
else
81+
echo "Invalid value for RDBMS: $RDBMS"
82+
exit 1
8083
fi
8184

8285
function logAndExec() {

docker_db.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ mariadb_wait_until_start()
138138
fi
139139
}
140140

141-
mariadb_10_5() {
141+
mariadb_10_6() {
142142
$CONTAINER_CLI rm -f mariadb || true
143-
$CONTAINER_CLI run --name mariadb -e MARIADB_USER=hibernate_orm_test -e MARIADB_PASSWORD=hibernate_orm_test -e MARIADB_DATABASE=hibernate_orm_test -e MARIADB_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MARIADB_10_5:-docker.io/mariadb:10.5.25} --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --lower_case_table_names=2
143+
$CONTAINER_CLI run --name mariadb -e MARIADB_USER=hibernate_orm_test -e MARIADB_PASSWORD=hibernate_orm_test -e MARIADB_DATABASE=hibernate_orm_test -e MARIADB_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d ${DB_IMAGE_MARIADB_10_6:-docker.io/mariadb:10.6.20} --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --lower_case_table_names=2
144144
mariadb_wait_until_start
145145
}
146146

@@ -1077,7 +1077,7 @@ if [ -z ${1} ]; then
10771077
echo -e "\tmariadb_11_4"
10781078
echo -e "\tmariadb_11_1"
10791079
echo -e "\tmariadb_10_11"
1080-
echo -e "\tmariadb_10_5"
1080+
echo -e "\tmariadb_10_6"
10811081
echo -e "\tmssql"
10821082
echo -e "\tmssql_2022"
10831083
echo -e "\tmssql_2017"

0 commit comments

Comments
 (0)