JBTM-845 include infinispan store in the store quickstart#629
Conversation
e2f2cbf to
b828061
Compare
| } | ||
|
|
||
| core.setOutput('environment_variables', JSON.stringify(extractedEnvVars)); | ||
| echo "quickstart parser GITHUB_ENV: $GITHUB_ENV" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
8399ea3 to
e915aaf
Compare
|
@mmusgrov I asked for help to copilot about the issue and this is what it says: |
| # INITIALIZE LRA ENV | ||
| export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=512m" | ||
|
|
||
| LRA_BRANCH=main |
| 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 |
There was a problem hiding this comment.
I think we should keep having $NY_BRANCH here
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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}
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I pushed another change, I had forgotten to update the GH Action with the new LRA_REPO and LRA_BRANCH var.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I made similar changes to the perf repo PR: jbosstm/performance#204
|
Getting the PR correct was quite a saga, thanks @marcosgopen for your input and help. |
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