Skip to content

JBTM-845 include infinispan store in the store quickstart#629

Merged
mmusgrov merged 2 commits into
jbosstm:mainfrom
mmusgrov:JBTM-845
May 1, 2026
Merged

JBTM-845 include infinispan store in the store quickstart#629
mmusgrov merged 2 commits into
jbosstm:mainfrom
mmusgrov:JBTM-845

Conversation

@mmusgrov

@mmusgrov mmusgrov commented Apr 24, 2026

Copy link
Copy Markdown
Member

https://redhat.atlassian.net/browse/JBTM-845

NARAYANA_REPO=mmusgrov
NARAYANA_BRANCH=JBTM-845
NY_BRANCH=JBTM-845

I have put the PR on hold since this PR depends on jbosstm/narayana#2357 and the GH action isn't detecting the NY_BRANCH=JBTM-845 variable

@mmusgrov mmusgrov added the Hold label Apr 24, 2026
@mmusgrov
mmusgrov force-pushed the JBTM-845 branch 2 times, most recently from e2f2cbf to b828061 Compare April 27, 2026 07:40
@mmusgrov mmusgrov changed the title JBTM-845 include infinispan store in the store benchmarks JBTM-845 include infinispan store in the store qucikstart Apr 27, 2026
@mmusgrov mmusgrov changed the title JBTM-845 include infinispan store in the store qucikstart JBTM-845 include infinispan store in the store quickstart Apr 27, 2026
Comment thread .github/workflows/parser.yml Outdated
}

core.setOutput('environment_variables', JSON.stringify(extractedEnvVars));
echo "quickstart parser GITHUB_ENV: $GITHUB_ENV"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think these 2 lines are causing the parser to fail (script is for JS, run is for shell). Please replace them with:

core.info(quickstart parser extracted envs: ${JSON.stringify(extractedEnvVars)});

Or create a new step:

  • name: Debug runner env (optional)
    if: ${{ github.event_name == 'pull_request' }}
    run: |
    echo "GITHUB_ENV: $GITHUB_ENV"
    env

@mmusgrov mmusgrov Apr 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you have any thoughts about why GH action isn't detecting the env vars in the PR description?
I added some debug to main.yml over the weekend and the env vars are not processed.

Is the syntax NY_BRANCH=JBTM-845 correct?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I remember we had a similar problem with other projects. The variables were set in the initial parser but then not available while executing the script IIRC. I will have a deeper look

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think these 2 lines are causing the parser to fail (script is for JS, run is for shell).

Ah that explains a lot, thanks.

I removed the debug commit.

@mmusgrov
mmusgrov force-pushed the JBTM-845 branch 2 times, most recently from 8399ea3 to e915aaf Compare April 27, 2026 14:03
@marcosgopen

Copy link
Copy Markdown
Member

@mmusgrov I asked for help to copilot about the issue and this is what it says:

Your PR body contains:

    NARAYANA_REPO=mmusgrov
    NARAYANA_BRANCH=JBTM-845
    NY_BRANCH=JBTM-845

But .github/workflows/parser.yml only extracts WILDFLY_RELEASE_VERSION from the PR description and passes only that through to the main workflow as environment variables.

So quickstart.sh runs with defaults:

    NARAYANA_REPO=${NARAYANA_REPO:-jbosstm}
    NARAYANA_BRANCH="${NARAYANA_BRANCH:-main}"
    NY_BRANCH is empty

(see quickstart.sh where those defaults are set: NARAYANA_REPO, NARAYANA_BRANCH, and optional NY_BRANCH are consumed there).
Fix: teach parser.yml to extract and forward Narayana variables

Update the possibleEnvVars list in .github/workflows/parser.yml to include:

    NARAYANA_REPO
    NARAYANA_BRANCH
    NY_BRANCH

So they get exported in .github/workflows/main.yml step “Load Dynamic Environment Variables”, and then quickstart.sh will clone/build the intended Narayana repo/branch.

Here is the concrete change:
jbosstm / quickstart / .github / workflows / parser.ymlv1

            const possibleEnvVars = [
              'WILDFLY_RELEASE_VERSION'
            ];

Change it to:
jbosstm / quickstart / .github / workflows / parser.ymlv2

            const possibleEnvVars = [
              'WILDFLY_RELEASE_VERSION',
              'NARAYANA_REPO',
              'NARAYANA_BRANCH',
              'NY_BRANCH'
            ];


# INITIALIZE LRA ENV
export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=512m"

LRA_BRANCH=main

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

git clone https://github.com/${NARAYANA_REPO}/lra.git -b ${LRA_BRANCH}
[ $? = 0 ] || fatal "git clone https://github.com/${NARAYANA_REPO}/lra.git failed"
echo "Checking if need Narayana LRA PR"
if [ -n "$NY_BRANCH" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should keep having $NY_BRANCH here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I see, that would cause to override the lra branch with the narayana branch. So that makes sense. However the change means that we will test the quickstart with lra main branch by default instead of a fixed version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Specifically in this case the quickstart clones and builds lra from mmusgrov/lra.git main branch which is outdated: in fact I can see an error that we used to have with lra some months ago. cc @mmusgrov

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

NY_BRANCH is the branch being tested for the narayana repo (in my case JBTM-845). I am not testing an LRA branch of the narayana repo so I need the LRA quickstarts to run against main so I introduced a new env variable for that - the problem is that the quickstarts make use of two repos (narayana and lra) and the script was not originally written to cope with that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In order to fix this we could add
LRA_REPO=${LRA_REPO:-jbosstm}

and then replace 'git clone https://github.com/${NARAYANA_REPO}/lra.git -b ${LRA_BRANCH}'
with
git clone https://github.com/${LRA_REPO}/lra.git -b ${LRA_BRANCH}

@mmusgrov mmusgrov Apr 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In order to fix this we could add LRA_REPO=${LRA_REPO:-jbosstm}

and then replace 'git clone https://github.com/${NARAYANA_REPO}/lra.git -b ${LRA_BRANCH}' with git clone https://github.com/${LRA_REPO}/lra.git -b ${LRA_BRANCH}

I'll give it a go
I deleted my suggestion

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks
NY_LRA_BRANCH or LRA_BRANCH are both fine with me

echo "Checkout failed: $BUILD_URL";
exit -1
fi
echo "Building LRA PR ${LRA_BRANCH}"

@mmusgrov mmusgrov Apr 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that I removed the check if [ -n "$LRA_BRANCH" ]; because LRA_BRANCH must be set at line 99 (LRA_BRANCH=${LRA_BRANCH:-main}. And we already check for a valid branch (git checkout $LRA_BRANCH on line 110).

I also removed the -b ${LRA_BRANCH} option from the git clone step since we go a git checkout $LRA_BRANCH after cloning.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I pushed another change, I had forgotten to update the GH Action with the new LRA_REPO and LRA_BRANCH var.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's also a script/action somewhere that populates new PR descriptions with a definition of what vars are processed - I'll look for that and add these two new vars to it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I made similar changes to the perf repo PR: jbosstm/performance#204

Comment thread ArjunaJTA/object_store/run.sh Outdated
Comment thread ArjunaJTA/object_store/run.sh Outdated
@mmusgrov

Copy link
Copy Markdown
Member Author

Getting the PR correct was quite a saga, thanks @marcosgopen for your input and help.

@marcosgopen marcosgopen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you Mike!

@mmusgrov
mmusgrov merged commit 9bc6503 into jbosstm:main May 1, 2026
3 checks passed
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.

2 participants