--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
I'm even +1 for you to be the benevolent dictator and make your enlightened scope the true one.
We can make this support 0.x like we did for Quarkus.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrZysw8u94L3FtqjD3vdT10doyo2s%2B8W2ew4eZHYacpMDQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrZysw8u94L3FtqjD3vdT10doyo2s%2B8W2ew4eZHYacpMDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a54c8bb9-aa12-488a-b2da-78efc4c52534%40googlegroups.com.
2- Quarkus dev mode and "fat" frontend technologiesQuarkus dev is able to live reload resource files in order to reflect the modifications (pretty neat with Java but also web development). As soon as you frontend relies on a build tool (webpack for instance) it's useless. Technologies like Angular, React, etc introduce a concept of "build" where they do a set of operations (like transpiling Typescript to JS, concatenating files, etc.).As for now, (just as I do with Spring) I started the backend application (with quarkus:dev) on port 8080 and start the frontend with live reload on 9000 (it's the default JHipster config). JHipster proposes a proxy config to redirect the request to 0.0.0.0:9000 to 0.0.0.0:8080 for dev mode.
3- AuthenticationCurrently (with a default config), JHipster exposes a /authenticate endpoint (https://github.com/jhipster/jhipster-sample-app/blob/master/src/main/java/io/github/jhipster/sample/web/rest/UserJWTController.java) which receives the user and password, Spring propose an AuthenticationManager system in which I can inject a custom `UserDetailsService` (https://github.com/jhipster/jhipster-sample-app/blob/master/src/main/java/io/github/jhipster/sample/security/DomainUserDetailsService.java) to load the Domain User from the database.The authenticationManager is in charge of doing the password comparaison and return the `Authentication`.Once authenticated, the JHipster application forges a JWT which is returned to the frontend. The client application will use this JWT for the next requests (and JHipster is configured with a JWT filter to validate, extract the claims and build the SecurityContext).In Quarkus, As far as I know, the extensions can't be combined? I can't use the JDBC to do a first authentication, manually build a token and then use MP-JWT for the rest of the security ?Digging a litle bit, I found the elytron-security extension which seems to propose a way to manually invoke an authentication (https://github.com/quarkusio/quarkus/blob/master/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronPasswordIdentityProvider.java)?WDYT?The other solution I have is to build my own AuthenticationService (very basic) but I don't think it's the proper way
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrZysw8u94L3FtqjD3vdT10doyo2s%2B8W2ew4eZHYacpMDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a54c8bb9-aa12-488a-b2da-78efc4c52534%40googlegroups.com.
2- Quarkus dev mode and "fat" frontend technologiesQuarkus dev is able to live reload resource files in order to reflect the modifications (pretty neat with Java but also web development). As soon as you frontend relies on a build tool (webpack for instance) it's useless. Technologies like Angular, React, etc introduce a concept of "build" where they do a set of operations (like transpiling Typescript to JS, concatenating files, etc.).As for now, (just as I do with Spring) I started the backend application (with quarkus:dev) on port 8080 and start the frontend with live reload on 9000 (it's the default JHipster config). JHipster proposes a proxy config to redirect the request to 0.0.0.0:9000 to 0.0.0.0:8080 for dev mode.I did toy with the idea of having Quarkus be able to automatically start the frontend live reload server and proxy requests automatically, so you could just access the application on 8080, but I was not sure how useful it would be as I am not really a fronend dev. Does this sound useful at all?
3- AuthenticationCurrently (with a default config), JHipster exposes a /authenticate endpoint (https://github.com/jhipster/jhipster-sample-app/blob/master/src/main/java/io/github/jhipster/sample/web/rest/UserJWTController.java) which receives the user and password, Spring propose an AuthenticationManager system in which I can inject a custom `UserDetailsService` (https://github.com/jhipster/jhipster-sample-app/blob/master/src/main/java/io/github/jhipster/sample/security/DomainUserDetailsService.java) to load the Domain User from the database.The authenticationManager is in charge of doing the password comparaison and return the `Authentication`.Once authenticated, the JHipster application forges a JWT which is returned to the frontend. The client application will use this JWT for the next requests (and JHipster is configured with a JWT filter to validate, extract the claims and build the SecurityContext).In Quarkus, As far as I know, the extensions can't be combined? I can't use the JDBC to do a first authentication, manually build a token and then use MP-JWT for the rest of the security ?Digging a litle bit, I found the elytron-security extension which seems to propose a way to manually invoke an authentication (https://github.com/quarkusio/quarkus/blob/master/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronPasswordIdentityProvider.java)?WDYT?The other solution I have is to build my own AuthenticationService (very basic) but I don't think it's the proper wayI think we need to make some improvements here. We have a FORM based auth that uses encrypted cookies to store the logged in user, however it it is not really designed for end user consumption.
Stuart
This is it, I hope it's clear enough. Feel free to ask questions.Daniel
On Thursday, December 19, 2019 at 6:31:31 PM UTC+1, Daniel PETISME wrote:
I do like the 0.x approach and consider it as experimental until a formal 1.0.
Le mer. 18 déc. 2019 à 11:24, Emmanuel Bernard <eber...@redhat.com> a écrit :
I'm even +1 for you to be the benevolent dictator and make your enlightened scope the true one.
We can make this support 0.x like we did for Quarkus.On 18 Dec 2019, at 11:22, Daniel Petisme wrote:
...@Max Andersen as for now I think we need to block a scope. Can we timebox the definition ? Let's say a week to discuss priorities and block a first version content?Make sense?
On Wed, Dec 18, 2019 at 10:57 AM Loïc MATHIEU <loik...@gmail.com> wrote:
Hello,Very interesting !I can help with anything MongoDB related if needed as I worked on it for Quarkus :)Regards,Loïc
Le mer. 18 déc. 2019 à 10:00, Max Andersen <mand...@redhat.com> a écrit :
--Hi,
Yesterday a few us met up with people involved in JHipster to hear about the current Quarkus blueprint work happening.Daniel Petisme are doing great work with his sample app and written up a doc listing his outstanding challenges - he also after the meeting outlined his view on a table of must/should/nice to have for a first version of a jhipster blueprint.From Quarkus core team we'll try and help where we can from Quarkus side on fixing issues and make recommendations on how to best implement a certain pattern; on jhipster side our expertise will fall short ;)
If anyone in the community are up for helping out Daniel making the blueprint complete you can grab items in the above if interested.Note: just to be clear, Quarkus built-in scaffolding is something different from jhipster scaffolding - we'll still work on making out-of-box Quarkus have a good default setup; this mail is to just make quarkus community aware of the jhipster work. If you are already in jhipster 'ecosystem' or who wants to explore using jhipster DSL approach for generating Quarkus apps you can do so.--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrZysw8u94L3FtqjD3vdT10doyo2s%2B8W2ew4eZHYacpMDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cxYDe4qGN1ri2V5j6q_SCo7KSTHEJCYzodY96xaPpt0DQ%40mail.gmail.com.
...@Max Andersen as for now I think we need to block a scope. Can we timebox the definition ? Let's say a week to discuss priorities and block a first version content?Make sense?
On Wed, Dec 18, 2019 at 10:57 AM Loïc MATHIEU <loik...@gmail.com> wrote:
Hello,Very interesting !I can help with anything MongoDB related if needed as I worked on it for Quarkus :)Regards,Loïc
Le mer. 18 déc. 2019 à 10:00, Max Andersen <mand...@redhat.com> a écrit :
--Hi,
Yesterday a few us met up with people involved in JHipster to hear about the current Quarkus blueprint work happening.Daniel Petisme are doing great work with his sample app and written up a doc listing his outstanding challenges - he also after the meeting outlined his view on a table of must/should/nice to have for a first version of a jhipster blueprint.From Quarkus core team we'll try and help where we can from Quarkus side on fixing issues and make recommendations on how to best implement a certain pattern; on jhipster side our expertise will fall short ;)
If anyone in the community are up for helping out Daniel making the blueprint complete you can grab items in the above if interested.Note: just to be clear, Quarkus built-in scaffolding is something different from jhipster scaffolding - we'll still work on making out-of-box Quarkus have a good default setup; this mail is to just make quarkus community aware of the jhipster work. If you are already in jhipster 'ecosystem' or who wants to explore using jhipster DSL approach for generating Quarkus apps you can do so.--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHL%3D7VssS%2BzPjXu4cdEx%2BDtnedE-3VLLczx8mgdLGrxxENgm4Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJLxjVEJ0SU6u6aBTPT-yxBrq9wk5kwPS17fVjgV3Yv%3DKYTSZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrZysw8u94L3FtqjD3vdT10doyo2s%2B8W2ew4eZHYacpMDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a54c8bb9-aa12-488a-b2da-78efc4c52534%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.

To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/9b02a6ab-fb83-4ebc-81ca-da96f5f8733d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cwA5yvKjRrYJVpePqYMzvEDi6QW4SR2z9bk95PamVR3tQ%40mail.gmail.com.
Hello,To answer Stuart's questionsCan you elaborate on why the Restassured testing was painful?I would separate my answer in 2 parts.First, I did not know RestAssurred before Quarkus, so there is a natural learning curveMost of the Quarkus/RestAssured are quite basics, and when people are already discovering Quarkus trust me if they have an issue with Restassured they will blame Quarkus...
Let's take an example
The sample projet uses java.time.Instant, and when I was testing, I had what looked like deserialization error. So I spend time to understand how I configure JsonB to unmarshall properly date/time.
Actually, the error was on RestAssured side which 1/ does not use JsonB as default object mapper out of the box 2/ needs to be configured to properly serialize dates in ISO8601 vs epoch (which one found make totally sense).
This issue was described here, Antonoio also raised it as a Quarkus issue where it was RestAssured.
https://github.com/quarkusio/quarkus-quickstarts/issues/205
So I think, couple of documentation/configuration could ease restassured testing:
1- pre-configure the defaultObjectMapper just as it's done with the application url?2- Complete the https://quarkus.io/guides/getting-started-testing doc with links to the RestAssured doc about key topics (content-negotiation, authentication, Serial/Deserial).
And BTW, I had couple of issues with jsonpath expression (I copy/pasted some tests assertions I had in Spring and they were not working exactly the same, but couple of try/fail iteration permits to figured out the proper jsonpath expression).
Secondly, is not related to Restassured specifically but more about the integration testing strategy.
Spring proposes a complete integration mock layer (database, rest, security, etc), and Jhipster heavily relies on it to setup a test context. So in a first attempt, I try to mimic that and I failed.
https://github.com/quarkusio/quarkus/issues/1367
The position regarding mocking the application when running test is not very clear yet (at least for me), I saw you post regarding Mock improvement but I don't know how far Quarkus plan to mock the application component.So after couple of discussions, I choose to do black box testing for the integration part. The main drawback of this option is the test setup becoming more complex (since it has to follow the functional path of the application). For example, when testing user management, before testing the update of the current user for instance, I have to:
- call the user registration endpoint, the user registration sends an activation email
- Retrieve the activation email (I used the MockMailbox) to parse the mail text to get the token
- call the activation endpoint with the token.
- Call the authentication endpoint with the freshly created user to retrieve the JWT
- finally invoke the update account with the token in headers.While being more "realistic", the test development/debug is less siloted thus more complex to realize IMHO.
To be honest, I think every dev has its own definition unit vs integration vs whatever testing, and I don't want to fall into an expert debate.
Here, I translated what I knew from Spring to Quarkus. If I want to be critic regarding what I have done, maybe some tests are close to unit tests than other and I could probably rewrite some tests which simply instantiate the component under test (REST Resource, Service) rather than starting the whole application and go through complex layer to mock (security for instance).
Spring provides tools to basically simulate the while application (with MockMvc) which permits to enable/disable the security, inject a user in the security context, share transactions between the app code and the test code, etc.). This layer is obviously expensive to develop and more code means more issues, thus more support activity.
Maybe, Java developers went too far with mocking/simulations etc and Quarkus shouldn't fall into the rabbit hole and stick to the KISS philosophy.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACHzTrbjDYBa1VfSFQECxWLqrCt8bpX_xKiai9AQ4gwuY9cphw%40mail.gmail.com.
Hello,To answer Stuart's questionsCan you elaborate on why the Restassured testing was painful?I would separate my answer in 2 parts.First, I did not know RestAssurred before Quarkus, so there is a natural learning curveMost of the Quarkus/RestAssured are quite basics, and when people are already discovering Quarkus trust me if they have an issue with Restassured they will blame Quarkus...
Let's take an example
The sample projet uses java.time.Instant, and when I was testing, I had what looked like deserialization error. So I spend time to understand how I configure JsonB to unmarshall properly date/time.
Actually, the error was on RestAssured side which 1/ does not use JsonB as default object mapper out of the box 2/ needs to be configured to properly serialize dates in ISO8601 vs epoch (which one found make totally sense).
This issue was described here, Antonoio also raised it as a Quarkus issue where it was RestAssured.
https://github.com/quarkusio/quarkus-quickstarts/issues/205So I think, couple of documentation/configuration could ease restassured testing:
1- pre-configure the defaultObjectMapper just as it's done with the application url?2- Complete the https://quarkus.io/guides/getting-started-testing doc with links to the RestAssured doc about key topics (content-negotiation, authentication, Serial/Deserial).
And BTW, I had couple of issues with jsonpath expression (I copy/pasted some tests assertions I had in Spring and they were not working exactly the same, but couple of try/fail iteration permits to figured out the proper jsonpath expression).
Secondly, is not related to Restassured specifically but more about the integration testing strategy.
Spring proposes a complete integration mock layer (database, rest, security, etc), and Jhipster heavily relies on it to setup a test context. So in a first attempt, I try to mimic that and I failed.
https://github.com/quarkusio/quarkus/issues/1367
The position regarding mocking the application when running test is not very clear yet (at least for me), I saw you post regarding Mock improvement but I don't know how far Quarkus plan to mock the application component.So after couple of discussions, I choose to do black box testing for the integration part. The main drawback of this option is the test setup becoming more complex (since it has to follow the functional path of the application). For example, when testing user management, before testing the update of the current user for instance, I have to:
- call the user registration endpoint, the user registration sends an activation email
- Retrieve the activation email (I used the MockMailbox) to parse the mail text to get the token
- call the activation endpoint with the token.
- Call the authentication endpoint with the freshly created user to retrieve the JWT
- finally invoke the update account with the token in headers.While being more "realistic", the test development/debug is less siloted thus more complex to realize IMHO.
To be honest, I think every dev has its own definition unit vs integration vs whatever testing, and I don't want to fall into an expert debate.
Here, I translated what I knew from Spring to Quarkus. If I want to be critic regarding what I have done, maybe some tests are close to unit tests than other and I could probably rewrite some tests which simply instantiate the component under test (REST Resource, Service) rather than starting the whole application and go through complex layer to mock (security for instance).
Spring provides tools to basically simulate the while application (with MockMvc) which permits to enable/disable the security, inject a user in the security context, share transactions between the app code and the test code, etc.). This layer is obviously expensive to develop and more code means more issues, thus more support activity.
Maybe, Java developers went too far with mocking/simulations etc and Quarkus shouldn't fall into the rabbit hole and stick to the KISS philosophy.So to rephrase, RestAssured testing was painful but maybe I shouldn't have done it in the first place.
Thoughts?
Also any other major pain points that you had?Classloader issues
I had to use the repository pattern because on a particular test setup the Panache augmentation was not made properly (sorry it was a long time ago, I didn't keep track of the issue).
I have to retest with 1.3.0 I'll keep you informed.
IDE integration
It's frustrating to be able to simply click on "Run the application" or "Run the test". I'm not very used to run Maven stage from the IDE so I had play with Maven CLI to run the proper unit/integration test in debug mode.
Surefire vs Failsafe code coverage
I tried to setup test coverage (with jacoco) and I had class loader issues
Pain points with a solution but not totally finishedCachinghttps://github.com/quarkusio/quarkus/issues/6492
At the end it was not the proper solution but still the feature is not covered yetEntityGraph loadingI tried to eagerly load an entity graph and ends up with a JPQL query (which is valid solution). I think HIbernate Panache finders could cover the need with an entity Graph definition (rather than s JQPL string).I plan to organize a status meeting where I could go in details and discuss these points.I hope this feedback helps you, feel free to ask me anything.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/9b02a6ab-fb83-4ebc-81ca-da96f5f8733d%40googlegroups.com.