Repository navigation
feat: add preflight hook to run commands before dip compose - #1
Merged
Merged
Conversation
LeipeLeon
force-pushed
the
feature/add-preflight-checks
branch
from
May 21, 2026 13:06
71e74f5 to
b096da1
Compare
New top-level `preflight:` key in dip.yml — an array of shell commands run before any `dip compose ...` subcommand (including `dip up`). A non-zero exit aborts before docker ompose is invoked, making it suitable for verifying credentials, required files, env vars, etc. Mirrors the existing `provision` pattern: sequential execution via `exec_subprocess` with `panic: true`, env interpolation, and `[]` as the default.
LeipeLeon
force-pushed
the
feature/add-preflight-checks
branch
from
May 21, 2026 13:18
b096da1 to
647be30
Compare
- Move the preflight call from `Commands::Compose#execute` to `Dip::CLI#compose` covers `dip compose`, `dip up`, `dip build`, `dip stop`, `dip down` - Add to `Dip::CLI#ktl` covers `dip ktl` - Add to Dip::Commands::Run#execute covers all runners `dip run ...`
LeipeLeon
force-pushed
the
feature/add-preflight-checks
branch
from
May 22, 2026 08:54
f5bee18 to
88cf98e
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
preflight:key todip.yml— an array of shell commands run before anydip compose ...subcommand (includingdip up). Non-zero exit aborts before Docker Compose runs.provisionpattern: sequentialexec_subprocesscalls withpanic: true, env interpolation, default[].$HOMEin twossh_speccontexts so they pass on developer machines (were assuming/root).Example
Test plan
spec/lib/dip/commands/preflight_spec.rbcovers no-op, sequential execution, and env interpolationconfig_spec.rbnow asserts thepreflightaccessor exists and defaults sanely162 examples, 0 failurespreflight: ["false"]abortsdip up;preflight: ["true"]proceeds; key absent → unchanged behavior🤖 Generated with Claude Code