-
Notifications
You must be signed in to change notification settings - Fork 26
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
Found a possibility of limiting the Linux build only for the 24.0.9 LTI version #1218
base: main
Are you sure you want to change the base?
Found a possibility of limiting the Linux build only for the 24.0.9 LTI version #1218
Conversation
Build Resullts example : https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12704625074 https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12704635529 https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12705078967 NOTE: You can see that for the LTI tag 24.0.9, both Windows and Mac have green builds because all the steps were skipped. For the 24.0.12 LTI tag, I haven't created the tag in my fork, which caused the failure in the checkout step. We can ignore it for now, and it will run on the remote repository. |
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.
Can we just exclude the windows and mac matrix instead so that the condition doesn't need to be checked in every step?
Hi @anusreelakshmi934 and @TrevCraw , https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12742932719 -> Normal Build https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12742954503 -> Cron Job builds NOTE: Only linux os is listed in the 24.0.9 LTI tag builds and you can see the change in name due to matrix constraints, please let me know the suggestions if any, |
.github/workflows/build.yaml
Outdated
os: macOS-latest | ||
reportName: mac-test-report | ||
- runtime: windows | ||
os: [ ubuntu-latest, macOS-latest, windows-latest ] |
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 there a reason the matrix needed to be changed up? Could we not just exclude runtime: windows
or runtime: mac
?
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.
Yes @TrevCraw ,I tried keeping the runtime
, but I am getting the error below because I am using exclude
to limit the OS for 24.0.9
.
https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12761300513
I tried using both include
(the code currently in the main branch) and exclude
(by keeping runtime), but the logic for running 24.0.9 LTI on Linux only is failing, and in some cases, I am encountering other errors as well.
https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12761891237
NOTE: So, if we are using exclude, the key should be the same as the matrix name.
Based on the error, I tried adding os
to the matrix, but this resulted in an increased number of builds (combining both runtime
matrix and OS
matrix). This is not desirable for Normal
and Cron Job
builds.
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.
@TrevCraw , I tried a different approach today that is working fine by keeping the runtime: mac
. This allows adding multiple OS options anytime by giving them different names and assigning unique names to the artifacts (both zip and test-reports)
I would also recommend updating the cron job documentation here - https://github.com/OpenLiberty/liberty-tools-intellij/blob/main/docs/LSP4IJ-Continuous-Integration.md#results-from-the-cron-job - to state what the |
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.
See review comments.
Latest build results: https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12782956248 -Cron Job build https://github.com/vaisakhkannan/liberty-tools-intellij/actions/runs/12783668287 -> Multiple OS Normal build |
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 changes seem OK to me, but I'm confused by the shared results. What is linux-1, linux-2, etc? Why are there multiple builds of the same OS? Is that just testing something out or are the builds now like that by default?
@TrevCraw , No, that's not the default. I added linux-1 and linux-2 for the same OS to verify that the builds are executing properly and to ensure that artifact names are unique for each runtime, preventing any name collisions in the reports. We also have scenarios that require testing by running multiple runtime instances simultaneously for mutiple os.I have checked that possibility and its working. Currently, in this PR, there is only one runtime instance per OS |
![specify LTI tag to limit os](images/specify-LTI-tag-to-limit-os.png) | ||
|
||
There is no need to update the code each time. That means, If we remove `24.0.9` from the **LTI** tags in the **cronJob.yaml** file, there is no need to modify anything in the **build.yaml** file. The variable `excludeLTITag` will calculate its value and will return `false` always since it not there in **LTI** tag. This ensures it works as expected for both **normal** and **cron job** builds. |
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.
since it is not there
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 updated the change you suggested, Thanks for the suggestion
@TrevCraw I think that was answering my question about running ten linux builds when you want to reproduce an intermittent error. |
Fixes #1217
This fix added a check (based on the value 'excludeLTITag') on macOS and Windows to verify if 'refLTITag' is equal to '24.0.9'. The value of 'excludeLTITag' is used to determine whether the Job
build
need to be executed. This 'excludeLTITag' variable can be removed once the '24.0.9' version is removed from the 'tag' array of the cron job build.But it is not necessary. That means, If we remove 24.0.9 from the LTI tags in the
cronJob.yaml
file, there is no need to modify anything in thebuild.yaml
file. The variableexcludeLTITag
will calculate its value and will returnfalse
always since it not there inLTI
tag. This ensures it works as expected for bothnormal
andcron job
builds.I tried this solution to make changes in the
build.yaml
file without using the if condition for all steps in the job. By calculating the filtering of the OS based on the LTI tag24.0.9
at the matrix level, this fix becomes more feasible.