Repository navigation
[#3169] Made 'nginx' start after 'php' and corrected the SSH agent recovery advice in 'vortex-doctor'. - #3170
Conversation
…nginx' resolves its upstream.
…iner when the SSH key is missing inside it.
… while the stack is running.
…ctions' prose rule.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. WalkthroughThe nginx service now starts after php. The SSH-agent diagnostics, tests, and Pygmy documentation describe recreating the CLI container when SSH-key access is unavailable. Changesnginx startup ordering
SSH-agent recovery guidance
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to nginx starts after php, and the SSH-agent guidance provides a viable recovery path. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the keys at dawn, Comment |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3170 +/- ##
==========================================
- Coverage 87.02% 86.65% -0.37%
==========================================
Files 114 106 -8
Lines 5255 5089 -166
Branches 49 3 -46
==========================================
- Hits 4573 4410 -163
+ Misses 682 679 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6abd89fca000e2fc30a5a39a--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
….bats' so an inherited preset can't turn off the SSH check.
…e 'PREFLIGHT' only defaults flags the fixture already sets.
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #3169
Summary
nginxnow listsphpunderdepends_onindocker-compose.yml, so Compose startsphpfirst, andvortex-doctornow recommendsahoy up --no-deps --force-recreate clifor an SSH key that's missing inside the CLI container, where it used to saypygmy restart(failedssh-add -lcheck) or a bareahoy up(key missing from Pygmy).nginxandphpboth depended only oncli, so Compose started them in parallel. nginx resolves its FastCGI upstream when it loads its config, so whenphphadn't joined the network yet it exited with[emerg] host not found in upstream "php", and with no restart policy on any service it stayed down. It's a race, so it only shows up now and then. The SSH advice had a separate gap: the CLI container reaches the Pygmy agent throughvolumes_from: container:amazeeio-ssh-agent, and/lagoon/entrypoints/10-ssh-agent.shlinksSSH_AUTH_SOCKonly if that socket exists when the container starts.pygmy restartcreates a newamazeeio-ssh-agentand leaves a running CLI container attached to the previous agent, so following the advice reproduced the failure, andahoy upalone does nothing becausedocker compose up --detachleaves a running container with an unchanged config alone.After merge,
docker compose upstartsphpbeforenginx, andahoy up --no-deps --force-recreate clireattaches the CLI container to the current agent sossh-add -lpasses again. This doesn't add a restart policy tonginx, doesn't touch Lagoon deployments (they ignoredepends_on), and leaves the doctor's other checks alone, includingRun 'pygmy up' or 'pygmy restart' to fix.for a stopped Pygmy service andAfter adding these lines, run 'ahoy up'.for a missingvolumes_fromentry, where the config change does recreate the container.Before / After
Startup order
Doctor advice for a missing SSH key
Changes
Startup order
docker-compose.yml: addsphptonginx.depends_on. The short list form resolves tocondition: service_started, songinxwaits for thephpcontainer to start..vortex/tests/phpunit/Fixtures/docker-compose.{noenv,env,env_mod,env_local}.json: the 4 resolved-config fixtures gainphp(conditionservice_started) undernginx.depends_on..vortex/installer/tests/Fixtures/handler_process/_baseline/docker-compose.yml: gains- php. The 20 scenariodocker-compose.ymlfixtures are diffs against the baseline, so they only move their@@hunk offsets by 1 line.Doctor advice
.vortex/tooling/src/vortex-doctor: the failure for an agent that's unreachable inside the CLI container now ends withRun 'ahoy up --no-deps --force-recreate cli'., and the warning for a key missing from Pygmy now ends withRun 'pygmy restart' and then 'ahoy up --no-deps --force-recreate cli'..vortex/tooling/tests/unit/doctor.bats(new, the script had no BATS file): 5 tests with strictsteps_runmocks forpygmyanddocker. A key available in the CLI container passes. An unreachable agent (ssh-add -lexits 2) fails with the recreate advice and notRun 'pygmy restart'.. A key missing from Pygmy warns withpygmy restartplus the recreate command and never reachesssh-add -l. A volume that isn't mounted warns with thevolumes_frominstructions.VORTEX_DOCTOR_CHECK_SSH=0makes 0 calls topygmyordocker.Docs
.vortex/docs/content/development/environment/pygmy.mdx: new## SSH key in the CLI containersection. It explains that the CLI container links to the agent socket only at start, thatpygmy restartwhile the stack runs (or starting the stack before Pygmy) loses the key, thatahoy up --no-deps --force-recreate clirestores it, and thatahoy doctorprints that command.Summary by CodeRabbit
Bug Fixes
ahoy upalone may not replace the existing container.Documentation
ahoy doctorchecks key availability.