feat: add devcontainer testing environment for PR reviews#530
Open
marcusburghardt wants to merge 2 commits into
Open
feat: add devcontainer testing environment for PR reviews#530marcusburghardt wants to merge 2 commits into
marcusburghardt wants to merge 2 commits into
Conversation
Add devcontainer-based testing environment proposal with design, specs, and tasks. This change will provide maintainers with a one-command Fedora environment for interactive CLI testing during PR reviews using GitHub Codespaces, DevPod, or VS Code Dev Containers. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
33e72de to
56b5153
Compare
Add .devcontainer/ configuration providing a Fedora 43-based testing environment for interactive CLI testing during PR reviews. New files: - .devcontainer/Containerfile: Fedora 43 base with required packages - .devcontainer/devcontainer.json: devcontainer standard config - .devcontainer/scripts/post-create.sh: automated setup script - docs/dev-testing-environment.md: maintainer/contributor docs Modified files: - README.md: add link to dev testing environment docs - AGENTS.md: add .devcontainer/ to project structure - Makefile: add test-devcontainer smoke test target The post-create script builds complyctl and mock-oci-registry, installs snappy (v0.2.4) and ampel (v1.2.1) at pinned versions, clones and builds complytime-providers from main, configures a test workspace with Gemara content, and starts the mock OCI registry. GITHUB_TOKEN is handled with least-privilege scoping. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
56b5153 to
456281e
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.
Summary
Add a devcontainer-based Fedora 43 testing environment that gives maintainers and contributors a one-command path from reviewing a PR to running
complyctlcommands in a realistic environment.The environment supports GitHub Codespaces, DevPod, and VS Code Dev Containers. A post-create script automates the full setup: builds complyctl and mock-oci-registry, installs snappy (v0.2.4), ampel (v1.2.1), and conftest (v0.68.2) at pinned versions, clones and builds all complytime-providers, configures a test workspace with Gemara content, and starts the mock OCI registry with a readiness check. GITHUB_TOKEN is handled with least-privilege scoping.
The environment auto-rebuilds complyctl on shell login when the source has changed (e.g., after checking out a PR branch), with opt-out via
COMPLYCTL_SKIP_REBUILD=1. SELinux compatibility is handled via--security-opt label=disablefor podman rootless.Once merged, the same approach will be replicated to complytime-providers with a mirrored devcontainer configuration, enabling consistent testing of changes on both sides of the complyctl + providers pipeline.
OpenSpec artifacts in
openspec/changes/dev-testing-environment/(proposal, design with 10 decisions, spec with 3 FRs and 15 scenarios, tasks with 6 phases).Related Issues
This PR addresses a key friction point in the project collaboration workflow. Today, manually testing CLI UX changes requires setting up a complex multi-repository environment (complyctl + complytime-providers + complytime-demos) with Vagrant, Ansible, and libvirt. This discourages thorough manual testing during PR reviews.
With this change, any maintainer or contributor can go from "looking at a PR" to "running complyctl commands in a Fedora environment" in a single command. This accelerates:
Review Hints
docs/TESTING_ENVIRONMENT.mdfor the user-facing documentation and workflows (Codespaces, DevPod, VS Code)..devcontainer/scripts/post-create.shmirrors patterns fromtests/cross-repo/cross_repo_integration_test.sh(GITHUB_TOKEN least-privilege, mock registry readiness check).make test-devcontainerruns the CI smoke test (Containerfile builds). The full environment test requires DevPod or Codespaces:devpod up . --ide none && devpod ssh complyctl