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
[JBTM-3381] Enhance LRA Client for Quarkus #1707
Conversation
Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT |
TESTIT |
Started testing this pull request with LRA profile: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/291/ |
LRA profile tests passed - Job complete http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/291/ |
@ruromero Thanks, the changes look good except for some procedural tasks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have few minor points about the code changes. Otherwise it's nice. Thanks.
rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java
Show resolved
Hide resolved
@@ -320,13 +321,6 @@ public URI startLRA(URI parentLRA, String clientID, Long timeout, ChronoUnit uni | |||
} | |||
|
|||
lra = URI.create(response.getHeaderString(HttpHeaders.LOCATION)); | |||
|
|||
if (lra == null) { | |||
LRALogger.i18NLogger.error_nullLraOnCreation(response.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please with this remove the method error_nullLraOnCreation
from the i18NLogger
as well.
rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java
Show resolved
Hide resolved
@@ -1 +1 @@ | |||
org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder | |||
org.jboss.resteasy.microprofile.client.impl.MpClientBuilderImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change we should be consistent in whole LRA impl. The same change should be done in https://github.com/jbosstm/narayana/blob/master/rts/lra/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder.
I think especially this particular change would be nice to be tracked as a jira.
FYI @xstefank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you agree on the change I will create the JIRA for this and move it to a specific PR.
Thanks. |
Started testing this pull request with LRA profile: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/297/ |
LRA profile tests passed - Job complete http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/297/ |
Started testing this pull request with LRA profile: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/298/ |
LRA profile tests passed - Job complete http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/298/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me. Thanks.
The revised process for contributions is to include "Signed-off-by:" followed by the contributor’s name and email address in the commit message (which you already did):
With git, this step can be automated using git commit -s or git commit --signoff. I will update the automated text generated in new PRs to include this information. Thanks for bringing this policy change to our attention. |
@@ -305,7 +305,7 @@ public URI startLRA(URI parentLRA, String clientID, Long timeout, ChronoUnit uni | |||
|
|||
response = client.target(base) | |||
.path(START_PATH) | |||
.queryParam(CLIENT_ID_PARAM_NAME, client) | |||
.queryParam(CLIENT_ID_PARAM_NAME, URLEncoder.encode(clientID, "UTF-8")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it wise to encode the clientID? A few of points:
- it is not necessarily a URL since client ids are arbitrary strings and it may be confusing to the client to receive back something other that what he set on the start call;
- the json data returned by the API call for returning LRAs and the format of the returned data doesn't say anything about us encoding the client id
- encoded urls are usually for use in html pages but the client id is not for this purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding of the clientID
was my idea. I was afraid that the URL escaped characters won't be correctly transfered and interpreted. I was wrong as I can see from testing the functionality.
Agree that encoding is not necessary, sorry for misguidance @ruromero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I have reverted the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just my issue about encoding the clientID remaining.
Signed-off-by: ruromero <rromerom@redhat.com>
Done @mmusgrov |
Started testing this pull request with LRA profile: http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/300/ |
LRA profile tests passed - Job complete http://narayanaci1.eng.hst.ams2.redhat.com/job/btny-pulls-narayana/PROFILE=LRA,jdk=jdk8.latest,label=linux/300/ |
Hey,
I wanted to do a small contribution to the client after starting to use it. I hope you find my changes useful and relevant.
I didn't consider meaningful creating a Jira for this but if you feel it's a requirement even for such a small PR I'll do it.
Let me know if I didn't take something into account, specially regarding the pom.xml.
Thank you in advance.
Signed-off-by: ruromero rromerom@redhat.com
Fix https://issues.redhat.com/browse/JBTM-3381
LRA
!MAIN !CORE !QA_JTA !QA_JTS_JDKORB !QA_JTS_OPENJDKORB !QA_JTS_JACORB !BLACKTIE !XTS !PERF NO_WIN !RTS !AS_TESTS !TOMCAT !JACOCO