Fix kcidb, add console output logging#10
Merged
Merged
Conversation
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
There was a problem hiding this comment.
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
originandtests[*].pathconstraints via explicit validation in the submitter, with updated unit tests. - Remap pull-labs boot test names to the KCIDB
bootpath (so the dashboard classifies them as boot tests) and adjust error/fallback paths accordingly. - Add an
aws setup validateCLI 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.