[nomad-prep] P2 — dispatcher refactor: pluggable launcher + DISPATCHER_BACKEND flag #802
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#802
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of the Nomad+Vault migration prep backlog. Blocked by: #793 — P3 (
load_secret()inlib/env.sh).Goal
Refactor
docker/edge/dispatcher.shso the "launch a vault runner" code path is behind a single pluggable function, withDISPATCHER_BACKEND={docker,nomad}selecting the implementation. Onlydockeris implemented here; nomad lands as a pure addition during migration Step 5.Scope
Current state:
dispatcher.shcontains multiple inlinedocker run --rm ...command builds (action dispatch + alt-mode dispatches).Refactor into:
launch_runner ACTION_ID SECRETS_CSV MOUNTS_CSV— the one function that actually starts a runner.DISPATCHER_BACKENDenv var (defaultdocker). Dispatches to_launch_runner_dockeror_launch_runner_nomad._launch_runner_nomadimplemented as a stub that errors "not implemented" so tests catch accidental selection.docker rundirectly).Consume
$(load_secret NAME)from P3 for any secret read inside the dispatcher (remove inline sops decrypt if present; letload_secrethandle it).Acceptance criteria
DISPATCHER_BACKEND=docker(or unset) behaves identically to current on live stack — end-to-end vault action completes,result.jsoncommitted.DISPATCHER_BACKEND=nomadexits 1 with "nomad backend not yet implemented" and does not touch state.shellcheck docker/edge/dispatcher.shclean.load_secret.Why
Step 5 of the migration adds the nomad branch (a ~30-line
nomad job dispatch-based impl). Doing the refactor now — on the live docker stack where regressions are visible immediately — separates risk: refactor now, add-backend later.Labels / meta
[nomad-prep] P2— blocked by #793.