Skip to content

ci: add build and kernel metadata to LAVA jobs - #3108

Draft
Matt H (mattface) wants to merge 1 commit into
qualcomm-linux:masterfrom
mattface:metadata-improvements
Draft

ci: add build and kernel metadata to LAVA jobs#3108
Matt H (mattface) wants to merge 1 commit into
qualcomm-linux:masterfrom
mattface:metadata-improvements

Conversation

@mattface

@mattface Matt H (mattface) commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Jobs recorded the build URL, pull request and workflow run, but not the commit they were built from, the configuration under test, or the kernel in the image, and none of it could be queried.

The commit, branch and build type are derived from the event; the machine, distro, kernel, image and test plan the action already knows; the kernel's recipe, repository, commit and release are read from the SPDX SBOM every build already writes and passed over as an artifact.

They are written to a per-machine EXTRA_METADATA variables file passed alongside the existing one, so recording a new key needs no change in lava-test-plans.

This has no effect until the LAVA_TEST_PLANS_REF is bumped, but should quietly not add any metadata until that time.

name: ${{ steps.print-output.outputs.filename }}
path: ${{ steps.print-output.outputs.filename }}

- name: Upload build metadata

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might take us above the allowed artifact threshold (again) quickly. I'm not sure how to prevent the problem. Maybe upload to S3?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Size or count? I can bundle this into the other artifact to keep the count down?

INPUTS_MACHINE: ${{ inputs.machine }}
INPUTS_DISTRO_NAME: ${{ inputs.distro_name }}
INPUTS_KERNEL_DIRNAME: ${{ inputs.kernel_dirname }}
- name: Extract build metadata from the image SBOM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

turn it into action so you can install python dependencies properly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Theres no python dependencies to install, all are in stdlib I believe

@mwasilew

Copy link
Copy Markdown
Contributor

Pushed to next in the current implementation: https://github.com/qualcomm-linux/meta-qcom/actions/runs/34414310119

fi
fi
DISTRO="${INPUTS_DISTRO:-${INPUTS_DISTRO_NAME}}"
KERNEL="${INPUTS_DISTRO_NAME#${DISTRO}}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stripping distro off distro_name works for the two suffixes test.yml uses today ("" and _linux-qcom-6.18), but the matrix also builds qcom-distro_linux-qcom-6.18_u-boot-qcom and qcom-distro_linux-qcom-rt-6.18_qcom-distro-kvm.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fair, I've dropped that kernel variable because it was misleading anyway, and just pass distro and distro-name into metadata instead.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

Test run workflow

Test jobs for commit 908e505

qcom-distro
Pass: 8 | Fail: 2 | Total: 10
qcom-distro_linux-qcom-6.18
Pass: 6 | Fail: 2 | Total: 8
nodistro
Pass: 8 | Fail: 1 | Total: 9

@test-reporting-app

Copy link
Copy Markdown

Test Results

   68 files  ± 0    319 suites  ±0   7h 59m 10s ⏱️ - 3h 37m 53s
  151 tests  -  2    138 ✅ +25   1 💤  - 2  12 ❌  - 25 
2 097 runs  +18  2 049 ✅ +55  25 💤 +7  23 ❌  - 44 

For more details on these failures, see this check.

Results for commit 81b82c7. ± Comparison against base commit bc1ff3a.

This pull request removes 2 tests.
lava ‑ lava-test-retry
lava ‑ lava-test-shell

@qcomlnxci

Copy link
Copy Markdown

Test Coral run workflow

Test jobs for commit 81b82c7

  • qcomdistro: multimedia image
    Pass: 9 | Fail: 0 | Total: 9
  • qcomdistro: multimedia image-prop
    Pass: 41 | Fail: 0 | Total: 41

Jobs recorded the build URL, pull request and workflow run, but not the
commit they were built from, the configuration under test, or the kernel
in the image, and none of it could be queried.

The commit, branch and build type are derived from the event; the distro,
build config, image and test plan the action already knows; the kernel's
recipe, repository, commit and release are read from the SPDX SBOM every
build already writes and passed over as an artifact.

They are written to a per-machine EXTRA_METADATA variables file passed
alongside the existing one, so recording a new key needs no change in
lava-test-plans. Bump the pinned lava-test-plans revision to one that
renders it.

Signed-off-by: Matt Hart <matthart@qti.qualcomm.com>
@mattface

Copy link
Copy Markdown
Contributor Author

Milosz Wasilewski (@mwasilew) I've added a bump to LAVA_TEST_PLANS_REF in here, so if you push this to next again, it should show actual metadata in the LAVA jobs. I can always remove that change for this to be merged here later.

@mwasilew

Copy link
Copy Markdown
Contributor

Something didn't work. This is one of the jobs from the next branch: https://lava.infra.foundries.io/scheduler/job/408251/definition#defline15. It only contains "old" metadata.

@mattface

Matt H (mattface) commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Something didn't work. This is one of the jobs from the next branch: https://lava.infra.foundries.io/scheduler/job/408251/definition#defline15. It only contains "old" metadata.

Previous version of the patch (the one you pushed to next already) didnt have the LAVA_TEST_PLANS_REF change, so no new metadata will have been added.

@mwasilew

Copy link
Copy Markdown
Contributor

@mwasilew

Copy link
Copy Markdown
Contributor

New version works as expected. Here is an example job: https://lava.infra.foundries.io/scheduler/job/414293/definition#defline15

 metadata:
  path: projects/meta-qcom/
  build-url:
    https://qli-prod-artifacts.qualcomm.com/qcom-prd-gh-artifacts/qualcomm-linux/meta-qcom/34614885753-1/
  pr-url: ''
  pr-number: ''
  gh-workflow-url:
    https://github.com/qualcomm-linux/meta-qcom/actions/runs/34614885753
  gh-workflow-run-id: '34614885753'
  gh-workflow-run-attempt: '1'
  build-type: PUSH
  build-run-id: '34614885753'
  source-repo: https://github.com/qualcomm-linux/meta-qcom
  source-branch: next
  source-sha: fd63d72a4ee826e1db199f3e963237220ec0b12a
  distro: nodistro
  build-config: nodistro
  testplan: nodistro/boot
  testkit-ref: testkit-2026.08.14
  lava-test-plans-ref: 2f2900cc3e7f2215ce7db6b5bf67955a0782ea31
  gh-workflow-name: Build on push
  image: core-image-base
  machine: iq-8275-evk
  kernel-recipe: linux-qcom-next
  kernel-version: 7.2+git
  kernel-release: 7.2.0-01462-gd49c33864d06
  kernel-repo: https://github.com/qualcomm-linux/kernel.git
  kernel-commit: d49c33864d06e9672dce57738be8851384578fcf

It needs to be confirmed whether this would work with PR as well.

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.

4 participants