Jbtm 3987 starting LRAs via a cluster of coordinators#50
Jbtm 3987 starting LRAs via a cluster of coordinators#50mmusgrov merged 4 commits intojbosstm:mainfrom
Conversation
|
Thanks @mmusgrov for your PR! It is great to have the 'support for starting LRAs using a cluster of coordinators'! I can see that the TCK failed, that is probably because the Stork module needs to be added in the lra-participant module of WildFly first[1]. [1] |
|
Thanks Marco, I've added the HOLD label while we investigate. I'll try out your recommendation and will report back later today. |
|
[Edit] Martin has given me a patch for our jboss-as clone that enables the change to run against the WildFly MP LRA testsuite. I'll update that with his patch and then re-trigger PR. |
|
Thanks @xstefank - adding your commit fixes the WildFly testsuite failure ie `Test Suite: Integration - MicroProfile TCK - LRA' passes. Since the fix was to add a "Depends on jbosstm/jboss-as#97" to the PR description I had to manually triggered the LRA-CORE / LRA github action for JDK 17 and 21 (https://github.com/jbosstm/lra/actions/runs/15759919429 shows them passing) and therefore the errors in the "Some checks were not successful" panel below remain - I wonder if there is a GH Action trigger corresponding to "Depends on ...". Will you review the PR. @marcosgopen I'll remove the HOLD label. |
|
Started testing this pull request with LRA profile: https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK21,label=jnlp-agent/145/ |
|
Started testing this pull request with LRA profile: https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/145/ |
|
Thanks Martin and Mike, I started the jobs on the CI to test this PR against our jboss-as repo. |
|
LRA profile tests failed (https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/145/): LRA AS Test failed |
|
LRA profile tests failed (https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK21,label=jnlp-agent/145/): LRA AS Test failed |
They PR did run with with the specific PR because of the "Depends on jbosstm/jboss-as#97" in the pull description (see https://github.com/jbosstm/lra/actions/runs/15759919429 for the successful runs). I thought we are using github actions for this repo, are we maintaining both build systems now on this repo? |
@mmusgrov the successful run you are pointing at (https://github.com/jbosstm/lra/actions/runs/15759919429) used the lra source code from main branch.
Yes we are using github actions for this repo, but I can see the runs (https://github.com/jbosstm/lra/actions/runs/15689158243/job/44199809265?pr=50) are not using the correct jboss-as (jbosstm/jboss-as#97) |
|
Started testing this pull request with LRA profile: https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK21,label=jnlp-agent/146/ |
|
I had to add explicitly 'jbosstm/jboss-as#97' in the description instead of 'jbosstm/jboss-as#97' in order to use that PR branch for testing cc @mmusgrov (this is something we need to remember/document) |
|
Started testing this pull request with LRA profile: https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/146/ |
'jbosstm/jboss-as#97' is in the description twice now. What do we need to remember/document? |
I think the one that is not a full URL can be deleted from the description. I have proposed some text to help clarify the expectations (https://github.com/jbosstm/narayana/pull/2379/files) |
|
LRA profile tests passed - Job complete https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/146/ |
[Edit] @tomjenkinson Ah I see what you mean: |
|
LRA profile tests passed - Job complete https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK21,label=jnlp-agent/146/ |
| */ | ||
| public static final String LRA_COORDINATOR_URL_KEY = "lra.coordinator.url"; | ||
| public static final String COORDINATOR_URLS_KEY = "lra.coordinator.urls"; | ||
| public static final String USE_STORK_KEY = "lra.coordinator.discoverable"; |
There was a problem hiding this comment.
Delete this since it isn't used.
| fail(testName + ": current thread should not be associated with any LRAs"); | ||
| } | ||
| if (lraClient.getCurrent() != null) { | ||
| lraClient.clearCurrent(false); // otherwise it will interfere with subsequent tests |
There was a problem hiding this comment.
Clear this at the end otherwise the assert on line 203 is always going to pass!
There was a problem hiding this comment.
@marcosgopen I'll push an update to these two after your review in case you want to request other changes.
marcosgopen
left a comment
There was a problem hiding this comment.
Thanks @mmusgrov for your PR, together with the changes you mentioned I am approving this great PR! The CI tests passed now
|
Started testing this pull request with LRA profile: https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/147/ |
|
LRA profile tests passed - Job complete https://jenkins-csb-narayana-ci.dno.corp.redhat.com/job/btny-pulls-lra/PROFILE=LRA,jdk=openJDK17,label=jnlp-agent/147/ |
|
I will merge this but note that github actions will fail until we have merged the jboss-as changes because the GH Actions do not have the ability to use that jboss-as clone/. [edit] I have merged the jboss-as changes now so GH Actions should be working again,. |
https://issues.redhat.com/browse/JBTM-3987
The depends on pr has been merged.
!JACOCO !JDK21
This PR adds support for starting LRAs using a cluster of coordinators. This version supports a static list of coordinator endpoints via the config property "lra.coordinator.urls". The change uses the SmallRye Stork service discovery and load balancer framework. The discovery of coordinators is integrated into NarayanaLRAClient, ie client side, and currently uses the "lra.coordinator.urls" property to configure a static list of coordinators, a simple change can be made for supporting the many other discovery mechanisms such as Consul, Kubernetes etc provided by Stork but I thought it best to start out with a static list. Note that only the creation of new LRAs is load balanced and we don't support shared lifecycle management of LRAs yet so, in particular, it won't support failover.
I need the PR integration tests to run with the latest code so I included a "TEST CHANGE ONLY: enable the option to use war from Narayana when run commit that does that using the feature/fix that @arjantijms recently added.
I updated LRATest to use a cluster of two coordinators. They share the same store and even though such a config would not be viable for users it works well in the context of our test suite since the issues around sharing stores only becomes apparent when coordinators re-read the store and start managing each others transactions (I may add a test that shows the problem at a future date). I'll also follow up with a doc update and a jbossts blogspot article.