✨ Replace asciinema with godog-based demo recording#2801
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR replaces the previous hack/demo/* asciinema-driven shell demo pipeline with Godog @demo scenarios that generate asciicast v2 recordings programmatically during e2e execution, and updates docs/CI to publish and consume those recordings without relying on asciinema.org.
Changes:
- Added a Go-based asciicast v2 recorder with Godog hooks to capture step/command output and timing for
@demoscenarios. - Introduced new demo feature scenarios + step implementations and excluded demos from normal e2e runs while enabling a dedicated
make update-demospipeline (casts + SVG conversion). - Updated documentation and MkDocs configuration to embed/play recordings from the repo’s published docs site; removed legacy demo scripts/resources.
Reviewed changes
Copilot reviewed 35 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/steps/upgrade_steps.go | Threads scenario ctx into some kubectl calls and adds demo-friendly RecordCustom output for catalog conditions. |
| test/e2e/steps/tls_steps.go | Updates helpers to new k8sClient(ctx, ...) API and records port-forward commands during demos. |
| test/e2e/steps/steps.go | Changes kubectl execution to be context-aware, capture stdout/stderr separately, and record commands for demos. |
| test/e2e/steps/proxy_steps.go | Updates kubectl helper calls to new k8sClient(ctx, ...) signature. |
| test/e2e/steps/hooks.go | Registers asciicast recording hooks and adds per-scenario cleanup for catalog port-forward. |
| test/e2e/steps/ha_steps.go | Updates kubectl helper calls to new k8sClient(ctx, ...) signature. |
| test/e2e/steps/demo_steps.go | Adds demo-specific step definitions (catalog HTTP queries, RBAC checks, webhook container count check). |
| test/e2e/steps/asciicast_recorder.go | Implements asciicast v2 recording writer and step/command aggregation/dedup logic. |
| test/e2e/steps/asciicast_hooks.go | Adds Godog hooks to start/stop recording for @demo scenarios and record per-step output. |
| test/e2e/features/demos.feature | Adds @demo feature/scenarios for ClusterCatalog quickstart, install modes, and webhook support. |
| test/e2e/features_test.go | Registers demo steps in the Godog scenario initializer. |
| requirements.txt | Adds mkdocs-asciinema-player dependency for docs playback. |
| README.md | Switches demo link from asciinema.org to GitHub Pages-hosted SVG. |
| mkdocs.yml | Enables the asciinema-player MkDocs plugin. |
| Makefile | Excludes @demo from standard e2e and adds update-demos, demo-e2e, and demo-svg targets. |
| docs/draft/howto/single-ownnamespace-install.md | Embeds new .cast recordings via asciinema-player blocks. |
| docs/draft/howto/enable-webhook-support.md | Embeds new .cast recording via asciinema-player blocks. |
| .gitignore | Ignores generated demo artifacts under docs/demos/. |
| .github/workflows/update-demos.yaml | Reworks demo workflow to generate casts/SVGs, upload artifacts, and deploy docs on push to main. |
| hack/demo/webhook-provider-certmanager-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/synthetic-user-cluster-admin-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/single-namespace-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/own-namespace-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/gzip-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/catalogd-metas-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/catalogd-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/graphql-demo-script.sh | Removes legacy shell-based demo script. |
| hack/demo/generate-asciidemo.sh | Removes legacy asciinema recording generator script. |
| hack/demo/graphql-demo-server/main.go | Removes legacy demo server used by the old GraphQL demo flow. |
| hack/demo/resources/webhook-provider-certmanager/webhook-operator-extension.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/webhook-provider-certmanager/webhook-operator-catalog.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/webhook-provider-certmanager/validating-webhook-test.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/webhook-provider-certmanager/mutating-webhook-test.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/synthetic-user-perms/cegroup-admin-binding.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/synthetic-user-perms/argocd-clusterextension.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/single-namespace-demo.yaml | Removes legacy demo resource manifest. |
| hack/demo/resources/own-namespace-demo.yaml | Removes legacy demo resource manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4caae72 to
f3e39f5
Compare
Convert terminal demos from standalone shell scripts recorded via asciinema to Godog BDD scenarios that generate asciicast v2 files programmatically. This makes demos into verified tests that can never silently break while producing terminal recordings. The recording infrastructure captures kubectl commands and their stdout/stderr with real execution timing during @demo-tagged scenario execution. Per-step dedup handles polling transparently so only successful results appear in the recording. Step text is emitted as comments and commands are colored for readability. Demo scenarios: - ClusterCatalog Quickstart: queries the operatorhubio catalog API - SingleNamespace Install Mode: installs mariadb-operator with a separate watch namespace, verifies rolebindings - OwnNamespace Install Mode: installs mariadb-operator with watch namespace equal to install namespace - Webhook Support: installs telegraf-operator, verifies mutating webhook injects sidecar container into test pod Not converted (no matching demo scenarios): - Synthetic User Permissions: feature gate disabled in experimental - Helm Chart Support: blocked by OCPBUGS-95281 The update-demos Makefile target now builds OLM from source using the experimental e2e infrastructure, deploys with all feature gates and operatorhubio catalog, runs demo scenarios, converts recordings to SVG via svg-term-cli, and tears down the cluster. Demo recordings are embedded in docs via the mkdocs-asciinema-player plugin and served from GitHub Pages, removing the dependency on asciinema.org for hosting recordings. Demo scenarios are excluded from regular e2e test runs via ~@demo filter. CI workflow (update-demos.yaml): - On PR: generates demos, uploads asciicast and SVG files as job artifacts - On merge to main: generates demos, deploys docs with updated recordings via make deploy-docs Old demo shell scripts, the asciinema generate-asciidemo.sh wrapper, and hack/demo/ resource files have been removed. Co-Authored-By: Claude <noreply@anthropic.com>
f3e39f5 to
7debcdc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 38 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
test/e2e/steps/tls_steps.go:114
portForwardnow accepts acontext.Contextbut thekubectl port-forwardprocess is started withexec.Command(notexec.CommandContext), so the context is currently ignored. This can leave the port-forward running longer than intended if the scenario context is canceled (timeouts / suite shutdown), and is inconsistent with the new context-aware command helpers.
|
/approve Although I'm wondering if the demo is still useful? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Replace standalone shell demo scripts recorded via asciinema with Godog BDD scenarios that generate asciicast v2 files programmatically. This makes demos into verified tests that can never silently break while producing terminal recordings.
Motivation
asciinema.org is unreachable from GitHub Actions runners (Azure) since June 2026, causing the daily demo CI job to fail consistently. Rather than just fixing the upload, this PR converts the entire demo pipeline to use the existing e2e test infrastructure, ensuring demos are always validated against the current codebase.
What changed
Recording infrastructure (
test/e2e/steps/asciicast_*.go):AsciiCastRecordergenerates asciicast v2 files using stdlib only@demotag activates recording via godog Before/After hooksrequire.Eventuallypolling transparentlyk8sClientandk8scliWithInputnow acceptcontext.Context, capture stdout/stderr separately with real timingRecordCustomprovides human-friendly command display (e.g.,kubectl get deploymentsinstead of jsonpath queries)4 demo scenarios (
test/e2e/features/demos.feature):Not converted (no matching demo scenarios):
Makefile & CI:
update-demosbuilds OLM from source using experimental e2e infrastructure, deploys with all feature gates + operatorhubio catalogdemo-svgconverts asciicast to SVG viasvg-term-cliin Docker~@demofilterDocumentation:
mkdocs-asciinema-playerplugin (play/pause/scrub controls)Cleanup:
generate-asciidemo.sh, andhack/demo/resource files removedReviewer Checklist