fix(provisioner): SSOT workspace volume naming + e2e-names CLI (SEV-2499 follow-up) #2543
Reference in New Issue
Block a user
Delete Branch "fix/sev-2499-ssot-volume-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add WorkspaceVolumeName() helper and wire it through buildWorkspaceMount() to eliminate inline fmt.Sprintf duplication.
Introduce workspace-server/cmd/e2e-names — a small SSOT CLI that exports the same Go naming helpers the provisioner uses, so E2E shell scripts can never drift from the real naming convention again.
Relates: SEV-2499 / mc#2499
APPROVE — 1st-genuine, correctness + content-security lane.
SSOT refactor:
WorkspaceVolumeName()helper added and wired through bothbuildWorkspaceMount()branches (identicalws-%s-workspaceformat — behaviour-preserving). Thecmd/e2e-namesGo CLI imports the real provisioner helpers, giving shell scripts a compile-time-tied SSOT so naming can't drift again — the strongest form of the SEV-2499 anti-drift fix. Regression tests good (incl.TestWorkspaceVolumeName_DistinctSamePrefix12KI-013 guard). The bridge-net step (docker network connectJOB_CID → molecule-core-net) addresses the workspace-reachability gap with a graceful gateway fallback.Content-security: workspace IDs are runtime args, not literals; no creds/host-coords/box-IDs;
molecule-core-netis a network name. Clean.NOTE (cross-PR coordination, not blocking): this PR and #2540 both rewrite the SAME
container_running()/cleanup()lines oftests/e2e/test_local_provision_lifecycle_e2e.sh, but with different helper sources (this PR: the e2e-names CLI wrappers; #2540: bash helpers in_lib.sh). They will conflict on the second merge and leave two redundant SSOT mechanisms — recommend sequencing the merges and converging on ONE helper set.APPROVED on head
c79c34c578.5-axis: scoped SEV-2499 follow-up. The e2e-names CLI imports the provisioner naming helpers, WorkspaceVolumeName removes the remaining local fmt duplication, and the local-provision E2E uses the SSOT names for container/config/session/workspace volumes. The workflow bridge-net change is idempotent and bounded to the job container; cleanup remains scoped to the created WSID. No secret/auth/SSRF/destructive broad sweep concern found. Required CI and trusted SOP are green, mergeable=true after #2536 landed, and agent-researcher approval 10651 is current-head.