WIP: workflows: limit the testjobs count list-files action#1648
WIP: workflows: limit the testjobs count list-files action#1648mwasilew wants to merge 1 commit intoqualcomm-linux:masterfrom
Conversation
There was a typo in list-files action: ${{ input.prefix }}. Should be
${{ inputs.prefix }}. This causes unrelated files to be counted towards
the list of test jobs to be executed. This patch fixes the typo and uses
the prefix to filter the files that will be send to LAVA for execution.
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
| shell: bash | ||
| run: | | ||
| JOBFILES=$(find . -name "${{ input.prefix }}*.yaml") | ||
| JOBFILES=$(find . -name "*.yaml" | grep ${{ inputs.prefix }}) |
There was a problem hiding this comment.
Why do we need to grep instead of using the find as is?
There was a problem hiding this comment.
the path to the file is long. Prefix is prepended to the directory name. Is there a way to tell find to search for {prefix}<wildcards>.yaml? I didn't find such option.
There are other yaml files in the repository and they also get added to the generated matrix. That's why the prefix is needed.
There was a problem hiding this comment.
But isn't it exactly find . -name "PREFIX*.yaml"?
There was a problem hiding this comment.
I tried - didn't work. With the typo we had it reduces to find . -name "*.yaml"
There was a problem hiding this comment.
The full path looks sth like this
boottest-rb3gen2-core-kit-qcom-distro/rb3gen2-core-kit-qcom-distro-boot/projects/meta-qcom/devices/rb3gen2-core-kit/boot.yaml
There was a problem hiding this comment.
@mwasilew find -path "${{inputs.prefix}}*/*.yaml"?
There was a problem hiding this comment.
@lumag
I'm silly. What works is a simple as:
find boottest* -type f -name "*.yaml"
or using the workflow syntax
find ${{inputs.prefix}}* -type f -name "*.yaml"
|
Let's mark it WIP. It might be better to work on full refactoring at this point |
There was a typo in list-files action: ${{ input.prefix }}. Should be ${{ inputs.prefix }}. This causes unrelated files to be counted towards the list of test jobs to be executed. This patch fixes the typo and uses the prefix to filter the files that will be send to LAVA for execution.