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

Default to drop-and-create for DevServices #19951

Merged

Conversation

stuartwdouglas
Copy link
Member

This allows for hibernate to be used without configuration.

@stuartwdouglas stuartwdouglas requested a review from Sanne September 7, 2021 05:50
@quarkus-bot quarkus-bot bot added area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE labels Sep 7, 2021
@stuartwdouglas
Copy link
Member Author

@Sanne in this case we know that we just started the container, so we know there is no schema there (unless they have used a custom image with the schema in it). I think this makes sense in terms of making this 'just work' out of the box.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Added a minor gripe: that's how it's documented everywhere now so let's be consistent.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 7, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building f56f305

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 16 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

@Sanne
Copy link
Member

Sanne commented Sep 7, 2021

Nice idea, thanks!

I wonder if the check on JdbcDataSourceSchemaReadyBuildItem is enough for getting a consistent experience though, as it's merely controlling the phase in which schema management needs to happen (for ordering), but it doesn't really tell

  1. if schemas are actually being generated
  2. which ones, in case of multiple datasources

I'll play a bit more with it to see if I'm missing something.

@geoand
Copy link
Contributor

geoand commented Sep 7, 2021

I was actually thinking about this yesterday when creating a demo. Definitely +1 from me for the idea.

@Sanne
Copy link
Member

Sanne commented Sep 7, 2021

Ok looks like this isn't too tricky when there are multiple PUs, works fine even on non-default PUs - although obviously one is no longer able to run "fully configuration-less"

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 7, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building c4434d3

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 16 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 10 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 8, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 3ecce72

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 16 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

@stuartwdouglas stuartwdouglas force-pushed the auto-create-devservices branch from 3ecce72 to b3b89ca Compare September 8, 2021 04:23
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 8, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building b3b89ca

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

⚙️ JVM Tests - JDK 16 #

- Failing: extensions/panache/hibernate-orm-panache/deployment 
! Skipped: docs extensions/panache/hibernate-orm-rest-data-panache/deployment extensions/security-jpa/deployment and 11 more

📦 extensions/panache/hibernate-orm-panache/deployment

io.quarkus.hibernate.orm.panache.deployment.test.PanacheJAXBTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:553)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)

This allows for hibernate to be used without configuration.
@stuartwdouglas stuartwdouglas force-pushed the auto-create-devservices branch from b3b89ca to 19566de Compare September 8, 2021 07:04
@stuartwdouglas stuartwdouglas merged commit 4621f42 into quarkusio:main Sep 8, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants