Skip to content

Set explicitly min database version for older db images to fix OCP tests #2506

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

Merged
merged 1 commit into from
Jul 4, 2025

Conversation

gtroitsk
Copy link
Member

@gtroitsk gtroitsk commented Jul 3, 2025

Summary

OpenShift tests are failing as Red Hat MariaDB and PostgreSQL images are using older versions than defaults configured at the build time. This is expected failure as minimum database versions has changed after upgrade to Hibernate ORM 7.0

Also in Quarkus 3.25 migration guide: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.25#hibernate-reactive

Our MariaDB 10.3 vs default 10.5
Our PostgreSQL 12 vs default 13

Please select the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • Dependency update
  • Refactoring
  • Backport
  • New scenario (non-breaking change which adds functionality)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)
  • This change requires execution with OCP on Aarch64 (use run arm tests phrase in comment)

Checklist:

  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@gtroitsk
Copy link
Member Author

gtroitsk commented Jul 3, 2025

run tests

@gtroitsk
Copy link
Member Author

gtroitsk commented Jul 3, 2025

run arm tests

@gtroitsk gtroitsk marked this pull request as ready for review July 4, 2025 08:43
@gtroitsk gtroitsk requested a review from michalvavrik July 4, 2025 08:44
Copy link
Member

@michalvavrik michalvavrik left a comment

Choose a reason for hiding this comment

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

I left comments, I am not certain I am right, think about it and say....

.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl);
.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl)
// set DB version as we use older version than default version configured at the build time
.withProperty("quarkus.datasource.db-version", "10.3");
Copy link
Member

Choose a reason for hiding this comment

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

I don't see a reason why we shouldn't use either RHEL9-based 10.5 ( https://catalog.redhat.com/software/containers/rhel9/mariadb-105/61a6084dbfd4a5234d596220 ) or 10.11 version here ( https://catalog.redhat.com/software/containers/rhel9/mariadb-1011/657b0463efad7c69e591c29b ). We have a Hibernate compatibility module for testing quarkus.datasource.db-version and I don't see any requirement for sticking to 10.3 in this specific test.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't see OCP tests in compatibility module, let's keep the tests how they are written now. I agree that we should move to newer still supported database versions, RHEL9-based 10.5 is an option here

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that something can differ for OCP, at best it differs in a config source (using env maybe). I'd not care, but sure, let's keep what you prefer.

.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl);
.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl)
// set DB version as we use older version than default version configured at the build time
.withProperty("quarkus.datasource.db-version", "10.3");
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as for the spring/spring-web-reactive/src/test/java/io/quarkus/ts/spring/web/reactive/bootstrap/OpenShiftSpringWebQuteReactiveIT.java test.

.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl);
.withProperty("quarkus.datasource.reactive.url", database::getReactiveUrl)
// set DB version as we use older version than default version configured at the build time
.withProperty("quarkus.datasource.db-version", "10.3");
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as for the spring/spring-web-reactive/src/test/java/io/quarkus/ts/spring/web/reactive/bootstrap/OpenShiftSpringWebQuteReactiveIT.java.

@@ -22,5 +22,5 @@ public class OpenShiftPostgresql12DatabaseIT extends AbstractSqlDatabaseIT {
.withProperty("quarkus.datasource.password", database.getPassword())
.withProperty("quarkus.datasource.jdbc.url", database::getJdbcUrl)
// set DB version as we use older version than default version configured at the build time
.withProperty("quarkus.datasource.db-version", "10");
.withProperty("quarkus.datasource.db-version", "12");
Copy link
Member

Choose a reason for hiding this comment

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

Same sort of comments for all changes of db-version for PG - I think it makes total sense to test PG 12 in the compatibility module with .withProperty("quarkus.datasource.db-version", "12"); and we should definitely do that, but I don't think we need to stick to some old PG version elsewhere unless we have some reason. So https://docs.jboss.org/hibernate/orm/7.0/dialect/dialect.html says 13 is minimum, nothing stops us form using PostgreSQL 13 https://docs.jboss.org/hibernate/orm/7.0/dialect/dialect.html. As for whether we should use 15 or 16 here, I don't know. I'd probably keep it at minimal like 13 so that we test also older versions.

Copy link
Member Author

Choose a reason for hiding this comment

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

PG has older supported version 13, so agree

Copy link
Member

Choose a reason for hiding this comment

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

Too late, already merged it 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

You were too fast, we can fix it in the next round of mage versions alignment with upstream

Copy link
Member

Choose a reason for hiding this comment

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

oki

Copy link
Member

@michalvavrik michalvavrik left a comment

Choose a reason for hiding this comment

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

OK, I still think that we should move on and this is not a good idea, but have it your way.

@michalvavrik michalvavrik merged commit 2b8e7c7 into quarkus-qe:main Jul 4, 2025
11 checks passed
@gtroitsk gtroitsk deleted the fix-ocp-image-tests branch July 4, 2025 12:48
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.

2 participants