Skip to content

refactor: simplify template storage and runtime tests - #925

Merged
ppat merged 1 commit into
mainfrom
refactor/template-runtime-tests
Sep 16, 2026
Merged

ppat merged 1 commit into
mainfrom
refactor/template-runtime-tests

Conversation

@homelab-agent-bot

Copy link
Copy Markdown
Contributor

Summary

  • move Supervisor service-command integration coverage from image CI into the template runtime test
  • replace the broad test-mode switch with explicit kubeconfig and dotfiles-script controls
  • mount the template ConfigMap once at /scripts and update every consumer
  • expose mutable home and temporary PVC sizes, with tmp constrained to 1-50 GiB and defaulting to 1 GiB

Runtime contract

Area Assertion
Parameters Coder's published metadata reports mutable home/tmp sizes and their exact bounds/defaults
Scripts Every ConfigMap-backed executable and Supervisor configuration exists under /scripts
Services Commands start after dotfiles, one restarts, and another remains independently running
Home Data survives stop/start and a template-owned claim is deleted with the workspace
Tmp The Pod-owned claim is deleted on stop and a distinct 2 GiB bound claim is provisioned on restart

The disposable Kind provisioner cannot validate in-place expansion of the persistent home volume. The test therefore
checks home mutability through Coder's rendered parameter contract while retaining the existing persistence and
deletion lifecycle assertions. Temporary storage is reprovisioned, so its requested and bound capacity are checked
against the live replacement PVC.

Validation

  • pre-commit run --all-files
  • tofu fmt -recursive -check
  • tofu validate
  • tflint --config=../../../.tflint.hcl
  • independent code review, with both non-vacuity findings fixed

@homelab-agent-bot
homelab-agent-bot Bot force-pushed the refactor/template-runtime-tests branch 6 times, most recently from 7d0079e to 70b9ba2 Compare September 16, 2026 19:59
Move Supervisor service-command coverage into the template integration job and use the released workspace image.

Replace test mode with explicit controls, mount scripts as one directory, and expose mutable storage sizes.

Test parameter metadata, script availability, service restarts, home lifecycle, and tmp PVC reprovisioning.
@homelab-agent-bot
homelab-agent-bot Bot force-pushed the refactor/template-runtime-tests branch from 70b9ba2 to 7fda778 Compare September 16, 2026 20:03
@ppat
ppat merged commit c0a2247 into main Sep 16, 2026
18 checks passed
@ppat
ppat deleted the refactor/template-runtime-tests branch September 16, 2026 20:18
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