workflows: only run qcom-distro with 6.18 kernel on master#2304
workflows: only run qcom-distro with 6.18 kernel on master#2304mwasilew wants to merge 1 commit into
Conversation
Test Results 103 files ± 0 632 suites ±0 5h 7m 2s ⏱️ - 3m 9s For more details on these failures, see this check. Results for commit 68bfb9e. ± Comparison against base commit 8917dc1. |
| testkit_ref: "${{ needs.prepare-env.outputs.testkit-ref }}" | ||
| test-qcom-distro_linux-qcom-6-18: | ||
| needs: [prepare-env] | ||
| if: ${{ needs.prepare-env.outputs.target-branch == 'master' }} |
There was a problem hiding this comment.
This becomes too branch-specific. For the wrynose branch we also need to schedule tests using the qcom-next kernels. I'd really prefer to find a way to schedule the tests from the correct branch. Can we use workflow dispatching from here?
There was a problem hiding this comment.
Workflows on push event will run using the code from the branch. The only issue we're trying to solve here is pull requests. When using pull_request trigger in the workflow, it runs in the context of forked repository. This means it doesn't have access to the tokens in meta-qcom so the LAVA jobs can't be submitted. When the workflow is triggered by workflow_run or pull_request_trigger it runs in the context of main repository (meta-qcom) and has access to the secrets. The trade-off is that the source code of the workflow is taken from the default branch of the repository, in our case master. I'm reading the docs, but I don't see an option to grant access to the secrets and execute the workflow code from the target branch.
|
@lumag this is another approach (pasting here to gather initial comments) I didn't test it yet. It allows to call Would something like this work from your point of view? |
|
@mwasilew that looks ok. |
|
If you're happy with that let me change this PR implementation and see if it works. |
When running tests against PR the test plan is taken from master branch by default. This is due to how workflow_run github trigger works. The default behaviour causes wrynose branch PRs to fail due to differences in the build matrix. This patch attempts to fix the issue by running a branch specific test plan from test.yml workflow. Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
68bfb9e to
1a8711e
Compare
|
Yes, that's pretty bad. Can we instead dispatch a testing workflow instead? I.e. detect the branch in the workflow_run trigger and then use that branch to dispatch a new workflow? |
that's what this patch is doing. But github doesn't support that. I don't see any other way of dealing with different branches in the PR. IMHO there are 2 options:
I guess only other option is a github app that is implements all the test plan/branch logic. |


There are 2 tracks for running PR tests in meta-qcom branches: master and wrynrose. The build matrix in these branches diverged and qcom-distro with 6.18 kernel is not a separate build on wrynrose. When submitting a PR against wrynrose test workflow from master branch is used. For this reason the workflow from master must implement the logic to select branch specific test plan.