Skip to content

WIP: workflows: limit the testjobs count list-files action#1648

Open
mwasilew wants to merge 1 commit intoqualcomm-linux:masterfrom
mwasilew:workflows/fix-list-files-action
Open

WIP: workflows: limit the testjobs count list-files action#1648
mwasilew wants to merge 1 commit intoqualcomm-linux:masterfrom
mwasilew:workflows/fix-list-files-action

Conversation

@mwasilew
Copy link
Contributor

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.

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>
@mwasilew
Copy link
Contributor Author

shell: bash
run: |
JOBFILES=$(find . -name "${{ input.prefix }}*.yaml")
JOBFILES=$(find . -name "*.yaml" | grep ${{ inputs.prefix }})
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to grep instead of using the find as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

But isn't it exactly find . -name "PREFIX*.yaml"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried - didn't work. With the typo we had it reduces to find . -name "*.yaml"

Copy link
Contributor Author

@mwasilew mwasilew Feb 26, 2026

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@mwasilew find -path "${{inputs.prefix}}*/*.yaml"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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"

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the second option.

@mwasilew
Copy link
Contributor Author

Let's mark it WIP. It might be better to work on full refactoring at this point

@mwasilew mwasilew changed the title workflows: limit the testjobs count list-files action WIP: workflows: limit the testjobs count list-files action Feb 27, 2026
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