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

MongoDB with Panache quickstart #293

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

loicmathieu
Copy link
Contributor

The MongoDB with Panache quickstart application.

@gsmet
Copy link
Member

gsmet commented Sep 25, 2019

Could you rename it to simply mongodb-panache? I think I would like to get rid of the using- prefix at some point.

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.

I added a couple of comments.

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mongodb-panache</artifactId>
<version>999-SNAPSHOT</version>
Copy link
Member

Choose a reason for hiding this comment

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

That shouldn't be here. If it's generated with this then we have an issue with the bom.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a chicken an egg issue, the quickstarts are written before the extension goes into Quarkus so we need to hardcode the version, almost all guides does this.
If I remove it, you will not be able to merge the quickstarts before 0.24 is published ...

Copy link
Member

Choose a reason for hiding this comment

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

It's not an issue. We need the latest master deployed to test the quickstarts anyway. You can just remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

<html lang="en">
<head>
<meta charset="UTF-8">
<title>using-mongodb-panache - 1.0-SNAPSHOT</title>
Copy link
Member

Choose a reason for hiding this comment

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

We would drop the using- from here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

<configuration>
<systemProperties>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
</systemProperties>
Copy link
Member

Choose a reason for hiding this comment

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

Will the tests run properly? I don't see anything to launch a MongoDB instance for the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no test in the quickstart

Copy link
Member

Choose a reason for hiding this comment

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

Ah ah, silly me :).

@loicmathieu
Copy link
Contributor Author

@gsmet I renammed to mongodb-panache

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.

This looks good. We probably need to update the doc to reflect the artifact name/directory change.

Just marking it as non-mergeable as we need to wait for 0.23.0 to be released before merging this!

@loicmathieu
Copy link
Contributor Author

@gsmet, I'll update the doc. I'll send a PR in a few minutes :)

@cescoffier
Copy link
Member

It would be great to have a few tests. I tend to use the quickstart as a good sensor to know when we break things.

@loicmathieu
Copy link
Contributor Author

@cescoffier as the quickstart uses the Quarkus current version (0.23.2 as of today), it didn't really works untill the current master is released. So I cannot add tests before 0.24.
You can create an issue and assign it to me, I'll take care of it after 0.24 will be released.

@cescoffier
Copy link
Member

The PR must target the development branch (which you do) and use the version 999-SNAPSHOT.
During the release, we have a script updating the versions to the released version and pushing to the master branch,

@loicmathieu
Copy link
Contributor Author

@cescoffier I just remember why I didn't include any test, if I keep the 999-SNAPSHOT version on the pom I have the following issue (the same arise when I launch existing test like the one from the hibernate panache quickstat)

org.junit.jupiter.api.extension.TestInstantiationException: TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [org.acme.hibernate.orm.FruitsEndpointTest]: Failed to create the boostrap class loader
Caused by: java.lang.IllegalStateException: Failed to create the boostrap class loader
Caused by: io.quarkus.bootstrap.BootstrapException: Failed to create the deployment classloader for org.acme:hibernate-orm-resteasy::jar:1.0-SNAPSHOT
Caused by: io.quarkus.bootstrap.resolver.AppModelResolverException: Failed to read descriptor of org.acme:hibernate-orm-resteasy:jar:1.0-SNAPSHOT
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.acme:hibernate-orm-resteasy:jar:1.0-SNAPSHOT
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact io.quarkus:quarkus-bom:pom:999-SNAPSHOT
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact io.quarkus:quarkus-bom:pom:999-SNAPSHOT
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.quarkus:quarkus-bom:pom:999-SNAPSHOT

So I need to use a non-snapshot version to build the test (like 0.23.2), when it is ready, switch back to the 999-SNAPSHOT version and commit ...

I'll work on it later, I'll be on vacation for a week 🌞

@gsmet
Copy link
Member

gsmet commented Oct 9, 2019

OK, I'm merging this as we have the doc pointing to it. Let's add tests later.

@gsmet gsmet merged commit db6a5f5 into quarkusio:development Oct 9, 2019
@cescoffier
Copy link
Member

The issue is that it does not seem to work.

@loicmathieu loicmathieu deleted the feat/mongodb-with-panache branch January 9, 2020 10:23
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.

3 participants