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.
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 startTime is null then the action was never started so filling in the time is misleading and according to the LRAStatus model it doesn't really exist. It's better to track down the circumstances under which this condition can occur and fix it there. The creation of the LRA and starting it should effectively be a single action, for example in LRAService#startLRA the code that creates and starts the LRA should be inside a try catch block if that is the source of the error. There may be other places to check as well but, off the top of my head, LRAService is the only place where we create LRAs.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do you know how you managed to create the LRA without a status and/or a start time.
Uh oh!
There was an error while loading. Please reload this page.
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 could see the nullpointer exception running the quarkus microprofile-tck. It occurs with the completionStage. I will reproduce it and link the error message here to better identify the case
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.
The error message would be reported long after the area of the code where it failed to set a start time. If we can't track the cause then I think it would be better to leave the startTime as null and report it as such in the getLRAData call. Can we at least log what it thinks the status of the LRA is plus logging from any other parts of the code where we think the cause is? I would certainly suggest that the bit of code where we create and then start the LRA is enclosed in a try catch block.