Skip to content

Add a kola test asserting the SPDX package manifests ship in the image - #35

Merged
Vince Perri (vinceaperri) merged 1 commit into
aclmainfrom
user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json
Aug 31, 2026
Merged

Add a kola test asserting the SPDX package manifests ship in the image#35
Vince Perri (vinceaperri) merged 1 commit into
aclmainfrom
user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json

Conversation

@vinceaperri

@vinceaperri Vince Perri (vinceaperri) commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Adds acl.packages.package-manifest, which checks that /usr/share/os-manifests contains at least one *.spdx.json and that one of them is for the image, package-manifest.spdx.json. Sysext manifests are counted but not required.

Presence is all this checks. The documents' contents are compared against a checked-in golden SPDX 2.2 document by build_library/rpm/tests/test_generate_package_manifest.sh in azure-container-linux, run as a step in the Build RPMs job of the ACL GitHub PR pipeline.

Change Log

  • Add kola/tests/packages/package_manifest.go which registers acl.packages.package-manifest.

Type of Change

  • New kola test
  • Kola test fix/update
  • Platform integration change (Azure, QEMU, etc.)
  • CLI/command change
  • CI/automation change
  • Bug fix
  • Documentation update

Merge order

  1. Merge this PR.
  2. Wait for a mantle LKG container carrying it to be published to ACR.
  3. Merge azure-container-linux#57. It is what adds generate_package_manifest.py to acl-scripts.
  4. Merge acl-pipelines !28911 last.

Test Methodology

Merge Checklist

  • go build ./... passes (basic validation)
  • docker build -t mantle . succeeds (full multi-arch build; required for build-affecting changes)
  • go test ./... passes
  • go vet ./... reports no issues
  • Relevant kola tests pass against a test image
  • Documentation has been updated to match any changes
  • Ready to merge

Copilot AI lite review requested due to automatic review settings August 19, 2026 23:19
@vinceaperri
Vince Perri (vinceaperri) requested a review from a team as a code owner August 19, 2026 23:19
@vinceaperri
Vince Perri (vinceaperri) force-pushed the user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json branch from 2b842f9 to cc5093d Compare August 19, 2026 23:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new kola test to verify that Azure Container Linux images include SPDX package manifest(s) under /usr/share/os-manifests, and that the base image’s package-manifest.spdx.json is present.

Changes:

  • Register a new kola test packages.package-manifest (ACL-only) for qemu, qemu-unpriv, and azure.
  • Implement the test logic to discover *.spdx.json files in /usr/share/os-manifests and assert the image manifest exists.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread kola/tests/packages/package_manifest.go Outdated
Copilot AI review requested due to automatic review settings August 19, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

kola/tests/packages/package_manifest.go:27

  • Test names in this repo use a distro prefix (e.g., acl. / cl.). Since this test is restricted to acl only, naming it without the prefix makes it inconsistent with existing ACL-only tests and can make selection/filtering less clear.
		Name:        "packages.package-manifest",

Copilot AI review requested due to automatic review settings August 19, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

kola/tests/packages/package_manifest.go:31

  • The PR description/changelog refers to the test as packages.package-manifest, but the code registers it as acl.packages.package-manifest. Since acl-only tests elsewhere consistently use the acl. prefix (e.g., kola/tests/misc/kdump.go:26, kola/tests/ignition/passwd.go:147), please align the PR description (or rename the test) so users can reliably discover/run it by name.
	register.Register(&register.Test{
		Run:         packageManifestTest,
		ClusterSize: 1,
		Name:        "acl.packages.package-manifest",
		// Written by write_package_manifest in azure-container-linux, so
		// upstream Container Linux images do not carry these files.
		Distros:   []string{"acl"},
		Platforms: []string{"qemu", "qemu-unpriv", "azure"},

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 20, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

kola/tests/packages/package_manifest.go:49

  • If /usr/share/os-manifests is missing, the current find call will fail via MustSSH, but the fatal message won’t include stderr (where find reports the missing directory). Adding an explicit directory existence check makes the failure clearer, and quoting the path in the find command makes it more robust if the constant ever changes.
	findCmd := fmt.Sprintf("find %s -maxdepth 1 -type f -size +0c -name '*.spdx.json'", manifestDir)
	out := c.MustSSH(m, findCmd)

@vinceaperri
Vince Perri (vinceaperri) force-pushed the user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json branch from 1553598 to e0bed27 Compare August 21, 2026 00:09
Copilot AI review requested due to automatic review settings August 24, 2026 22:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread kola/tests/packages/package_manifest.go

@SeanDougherty SeanDougherty left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@vinceaperri
Vince Perri (vinceaperri) force-pushed the user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json branch from 7ec8a34 to f36839a Compare August 27, 2026 19:45
@vinceaperri
Vince Perri (vinceaperri) merged commit 3f953d4 into aclmain Aug 31, 2026
19 checks passed
@vinceaperri
Vince Perri (vinceaperri) deleted the user/vinceaperri/acl-package-manifest/add-os-manifest-spdx-json branch September 2, 2026 17:51
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.

3 participants