Conversation
Symptom: `./gradlew :backend:app:quarkusDev` boots on :8080 but every
DB-dependent request fails because:
INFO io.quarkus.hibernate.orm.runtime.JPAConfig — Hibernate ORM
persistence unit '<default>' was deactivated through configuration
properties
WARN io.agroal.pool — Datasource '<default>': FATAL: role "translately"
does not exist
Root cause: the Phase 0 default block in `application.yml` set
`quarkus.hibernate-orm.active: false` + `quarkus.flyway.active: false`
so the app could boot without a running database. Every phase from v0.1.0
onward shipped real entities + migrations (V1..V4), but neither the %dev
nor %prod blocks ever flipped these back to `true`. The kill-switch
leaked into every live dev + prod boot.
Tests stayed green because every IT suite that touches the DB does so
through `@QuarkusTestResource(PostgresAndMailpitResource::class)` which
carries its own datasource config with Hibernate + Flyway on. CI never
saw the failure the live `quarkusDev` path has exhibited since v0.1.0.
Fix: add `hibernate-orm.active: true` + `flyway.active: true` +
`flyway.migrate-at-start: true` to the `%dev` and `%prod` blocks. Keep
the default-block `active: false` so tooling-only tasks
(`quarkusGenerateCode`, schema smoke probes) still work without a DB —
update that block's comment to reflect the contract.
Verified: `./gradlew :backend:app:compileKotlin :backend:app:ktlintCheck`
clean. Tests continue to stand on their own `@QuarkusTestResource` config
and aren't affected. Manual verification: user starts docker compose +
quarkusDev; health endpoint now reports DB + Redis both UP; Flyway runs
V1..V4 on first boot.
Closes #180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quarkusDevhas been silently broken since v0.1.0 shipped: Hibernate ORM + Flyway are forced off by the Phase 0 default, and neither%devnor%prodre-enable them.@QuarkusTestResourcewith their own datasource config.Closes
What this fixes
Before:
After (expected on a fresh
docker compose up -d && ./gradlew :backend:app:quarkusDev):Test plan
./gradlew :backend:app:compileKotlin :backend:app:ktlintCheck— clean locallybuild + testsuite stays green (IT suites self-configure via@QuarkusTestResource; they don't read the default datasource)docker compose up -d && ./gradlew :backend:app:quarkusDev, checkcurl http://localhost:8080/q/healthreports UP for DBDocs
docs/self-hosting/runtime-profiles.mdalready claimed (post-PR-#178) "Hibernate ORM is active; Flyway runs migrations on boot." The code now matches the doc.Pre-merge
application.yml, only the three override lines per profile + a comment tweakFollow-up (out of scope for this PR)
/q/healthafterquarkus:buildso this class of regression can't hide behind the test-only datasource config again. Will open a separate ticket.Closes #180