ci: Add robot framework structure#732
Open
johnramsden wants to merge 2 commits into
Open
Conversation
68f3a89 to
ecacc58
Compare
johnramsden
added a commit
to johnramsden/microceph
that referenced
this pull request
May 21, 2026
The previous 14-test-case structure called test_dsl_functest.sh once per test case. Each call bootstraps its own fresh VMs/containers, so the job took 1h+ and never completed (cancelled after 1h 16m on PR canonical#732). The original CI ran run_dsl_full_tests as a single step, letting the script manage all VM lifecycles internally (shared VMs for baseline/validation/dryrun, isolated VMs for provision/cleanup/ consistency). Restore that behaviour with one test case and a 4-hour timeout, matching the upstream contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Ramsden <john.ramsden@canonical.com>
ffee815 to
97139ed
Compare
johnramsden
added a commit
to johnramsden/microceph
that referenced
this pull request
May 28, 2026
The previous 14-test-case structure called test_dsl_functest.sh once per test case. Each call bootstraps its own fresh VMs/containers, so the job took 1h+ and never completed (cancelled after 1h 16m on PR canonical#732). The original CI ran run_dsl_full_tests as a single step, letting the script manage all VM lifecycles internally (shared VMs for baseline/validation/dryrun, isolated VMs for provision/cleanup/ consistency). Restore that behaviour with one test case and a 4-hour timeout, matching the upstream contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Ramsden <john.ramsden@canonical.com>
d899910 to
2ca33a5
Compare
johnramsden
added a commit
to johnramsden/microceph
that referenced
this pull request
May 28, 2026
The previous 14-test-case structure called test_dsl_functest.sh once per test case. Each call bootstraps its own fresh VMs/containers, so the job took 1h+ and never completed (cancelled after 1h 16m on PR canonical#732). The original CI ran run_dsl_full_tests as a single step, letting the script manage all VM lifecycles internally (shared VMs for baseline/validation/dryrun, isolated VMs for provision/cleanup/ consistency). Restore that behaviour with one test case and a 4-hour timeout, matching the upstream contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Ramsden <john.ramsden@canonical.com>
06bf096 to
e868f2f
Compare
Replaces all 22 bash CI test jobs with Robot Framework 7.x suites that produce structured HTML/XML reports, support selective suite execution, and make failures easier to diagnose with inline keyword-level output. Structure: - tests/robot/resources/microceph_harness.resource — ~110 shared keywords (VM lifecycle, snap install, cluster bootstrap, OSD/RGW/NFS helpers) - tests/robot/resources/streaming_process.py — real-time output for long-running processes (DSL, cephadm-adopt, wiping) - 23 suite directories under tests/robot/, one per CI job: single-system-tests, multi-node-tests, availability-zone-tests, multi-node-tests-with-custom-microceph-ip, test-sequential-mon-host-refresh, test-maintenance-modes, loop-file-tests, wal-db-tests, upgrade-reef-tests, cluster-tests, rbd-replication-test, cephfs-replication-test, nfs-test, nfs-multinode-test, messenger-v2-tests, wiping-test, cephadm-adopt-test, dsl-functional-tests (6 parallel jobs), api-tests, static-checks, unit-tests - robot.py / tox.ini — CLI wrapper and tox integration for local runs - tests/scripts/: actionutils.sh idempotency fix, adoptutils.sh upstream fixes, test_dsl_functest.sh timeout hardening Migration style: - Inline reimplementation: bash logic rewritten as Robot/harness keywords (the majority — checked line-by-line for 1:1 parity) - Direct bash execution: very long suites (DSL x6, cephadm-adopt, wiping, api-disk) run the original .sh unchanged via Run Streaming Process - All flakiness fixes from upstream (canonical#737, canonical#741) incorporated; additional retry loops and polling guards added throughout Assisted-by: claude-code:claude-sonnet-4-6 Assisted-by: claude-code:claude-opus-4-7 Assisted-by: claude-code:claude-opus-4-8 Signed-off-by: John Ramsden <john.ramsden@canonical.com>
Rewrites .github/workflows/tests.yml to invoke Robot Framework instead of
calling actionutils.sh functions directly:
- Each of the 22 test jobs now runs:
python3 tests/robot/robot.py --snap-path <snap> --test-suite <suite>
- static-checks and unit-tests moved to checks.yml (run on every push,
not just when a snap artifact is available)
- DSL functional tests split into 6 parallel jobs (baseline, validation,
dryrun, provision, cleanup, consistency) to cut wall-clock time
- LXD initialisation made explicit; host dependency checks added
- Wiping test streams output from inside the outer VM (no nested KVM)
- bash -x tracing enabled for all DSL jobs to aid debugging
Assisted-by: claude-code:claude-sonnet-4-6
Assisted-by: claude-code:claude-opus-4-7
Assisted-by: claude-code:claude-opus-4-8
Signed-off-by: John Ramsden <john.ramsden@canonical.com>
e868f2f to
bcf5f0e
Compare
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.
Description
Migrate MicroCeph's CI test suite from bash + GitHub Actions to the Robot Framework. The new tests must be runnable locally without any GitHub Actions dependency.
See for context:
Type of change
Contributor checklist
Please check that you have: