Skip to content

Fix kcidb, add console output logging#10

Merged
nuclearcat merged 3 commits into
mainfrom
fix-kcidb
May 21, 2026
Merged

Fix kcidb, add console output logging#10
nuclearcat merged 3 commits into
mainfrom
fix-kcidb

Conversation

@nuclearcat
Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses KCIDB submission compatibility (notably test path/origin constraints and boot-test classification) and adds infrastructure to capture and validate console output logging / AWS setup before running real VMs.

Changes:

  • Enforce KCIDB v5.3 origin and tests[*].path constraints via explicit validation in the submitter, with updated unit tests.
  • Remap pull-labs boot test names to the KCIDB boot path (so the dashboard classifies them as boot tests) and adjust error/fallback paths accordingly.
  • Add an aws setup validate CLI command plus docs/config updates, and upload EC2 serial console output logs to S3 during VM cleanup.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_pull_labs_poller.py Adds coverage for boot test name/path remapping and aligns runtime event structure with implementation.
tests/test_kcidb_submit.py Adds tests for new KCIDB origin/path validators and updates expected path formats.
src/kernel_ci_cloud_labs/setup_validate.py New CLI-backed “pre-flight” validation for AWS permissions/resources and KernelCI/KCIDB tokens (optionally fixes missing S3 bucket).
src/kernel_ci_cloud_labs/pull_labs_poller.py Remaps boot tests to boot path and adjusts ERROR rows so the dashboard classifies failures as boot-related.
src/kernel_ci_cloud_labs/launch_vm.py Captures EC2 console output and uploads it to S3 during cleanup.
src/kernel_ci_cloud_labs/kcidb_submit.py Adds strict KCIDB v5.3 validation for origin and path in test rows.
src/kernel_ci_cloud_labs/cli.py Wires in aws setup validate subcommand and options.
README.md Documents the new validate command and what it checks.
QUICKSTART.md References the validate command as a quick pre-flight step.
examples/aws/config.json Adds ec2:GetConsoleOutput permission to example policy.
examples/aws/config-arm64.json Adds ec2:GetConsoleOutput permission to example policy.
examples/aws/alltests-config.json Adds ec2:GetConsoleOutput permission to example policy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +120 to 135
`origin` and `path` are verified against the KCIDB v5.3 constraints;
an invalid value raises ValueError instead of being submitted, so a bad
test name is caught here rather than failing the whole submission at the
ingester.

Raises:
ValueError: if `origin` or `path` is not KCIDB v5.3-compliant.
"""
origin = validate_origin(origin)
row: Dict[str, Any] = {
"id": f"{origin}:{test_id}",
"build_id": build_id,
"origin": origin,
"path": path,
"path": validate_test_path(path),
"status": to_kcidb_status(status),
}
Comment on lines +240 to +243
results["ec2_describe"] = check_ec2_permissions()
results["ec2_console_output"] = check_console_output_permission()
results["ssm"] = check_ssm_permissions()

kcidb require to follow some rules in tests names, and specific name
to classify tests as boot tests.
Also fixing one failing tests.
I am avoiding to add kcidb as dependency and adding manually critical
filtering/normalization.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat nuclearcat merged commit e91cd7e into main May 21, 2026
1 of 2 checks passed
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