Skip to content

Add KernelCI pull-lab poller, translator, and direct KCIDB submission#4

Open
nuclearcat wants to merge 1 commit into
mainfrom
add-kernelci-harness
Open

Add KernelCI pull-lab poller, translator, and direct KCIDB submission#4
nuclearcat wants to merge 1 commit into
mainfrom
add-kernelci-harness

Conversation

@nuclearcat
Copy link
Copy Markdown
Member

Wire pullab_cloud into the KernelCI pipeline as a PULL_LABS consumer: poll kernelci-api /events for jobs scheduled to runtime pull-labs-aws-ec2, translate the PULL_LABS job_definition into a per-run test_config, invoke the existing AWS run_pipeline(), and push per-test results directly to KCIDB via kcidb-restd-rs /submit.

Pipeline callback (lava_callback.py) is deliberately bypassed; tests attach to existing build_ids resolved from the maestro node tree, so checkouts/builds are not re-emitted. New code is generic Python (stdlib urllib only, no boto3 at module top level) and ships three entry points: CLI, library, and AWS Lambda handler.

Configuration is env-var-driven with config.json fallback. The KCIDB_REST=https://@host/submit form is supported for zero-effort reuse of an existing kci-dev configuration; explicit KCIDB_SUBMIT_URL+KCIDB_JWT takes precedence.

A new vm-tests/url-kernel-boot scaffold downloads the artifacts.kernel / artifacts.modules / optional artifacts.rootfs URLs from the job definition and emits a BenchmarkAnalyzer-compatible CSV; the deployment-specific boot step is left as a BOOT_HOOK extension point.

run_pipeline() now returns its summary dict (was discarded) so the poller can map per-VM pass/fail into KCIDB rows.

76 new pytest cases cover translation edge cases, KCIDB row/revision building, status mapping, KCIDB_REST parsing, credential priority, cursor store, event filtering, and build_id resolution. All 111 tests pass (35 pre-existing + 76 new).

See QUICKSTART.md for the full operator walkthrough.

This is not completely verified skeleton, just to start things up, so i expect follow up PRs.

Wire pullab_cloud into the KernelCI pipeline as a PULL_LABS consumer:
poll kernelci-api /events for jobs scheduled to runtime
pull-labs-aws-ec2, translate the PULL_LABS job_definition into a
per-run test_config, invoke the existing AWS run_pipeline(), and push
per-test results directly to KCIDB via kcidb-restd-rs /submit.

Pipeline callback (lava_callback.py) is deliberately bypassed; tests
attach to existing build_ids resolved from the maestro node tree, so
checkouts/builds are not re-emitted. New code is generic Python
(stdlib urllib only, no boto3 at module top level) and ships three
entry points: CLI, library, and AWS Lambda handler.

Configuration is env-var-driven with config.json fallback. The
KCIDB_REST=https://<token>@host/submit form is supported for
zero-effort reuse of an existing kci-dev configuration; explicit
KCIDB_SUBMIT_URL+KCIDB_JWT takes precedence.

A new vm-tests/url-kernel-boot scaffold downloads the
artifacts.kernel / artifacts.modules / optional artifacts.rootfs URLs
from the job definition and emits a BenchmarkAnalyzer-compatible CSV;
the deployment-specific boot step is left as a BOOT_HOOK extension
point.

run_pipeline() now returns its summary dict (was discarded) so the
poller can map per-VM pass/fail into KCIDB rows.

76 new pytest cases cover translation edge cases, KCIDB row/revision
building, status mapping, KCIDB_REST parsing, credential priority,
cursor store, event filtering, and build_id resolution. All 111 tests
pass (35 pre-existing + 76 new).

See QUICKSTART.md for the full operator walkthrough.

This is not completely verified skeleton, just to start things up,
so i expect follow up PRs.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
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.

1 participant