Scope CI image pulls to each job's real dependencies#56
Merged
Conversation
Every job pulled and started the whole compose stack (mariadb, phpfpm, nginx, mail, rabbit, elasticsearch, …). Scope each to its real deps: - api-spec export, PHPStan, Rector → phpfpm only, as one-off `docker compose run --rm --no-deps phpfpm …` (no lingering container, matching the templated composer/php/twig workflows) - API test → phpfpm + elasticsearch via `up --wait --no-deps` (ES must be a running service the tests connect to) Pull only the needed images; --no-deps stops phpfpm's mariadb/rabbit dependencies from dragging the rest of the stack in. The api-spec job now drives docker compose directly, dropping the Task setup that ran `site:update` (= pull/up everything). Verified: the full suite passes with mariadb and rabbit stopped; tests reference no Doctrine/DB and ApiTestCase uses the in-process kernel, so nginx is not needed either.
…pulls # Conflicts: # CHANGELOG.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #56 +/- ##
=============================================
- Coverage 72.99% 72.89% -0.10%
Complexity 232 232
=============================================
Files 29 29
Lines 648 653 +5
=============================================
+ Hits 473 476 +3
- Misses 175 177 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Every workflow job pulled and started the whole compose stack (mariadb, phpfpm, nginx, mail, rabbit, elasticsearch, markdownlint, prettier) even when it only needed PHP. This scopes each job to what it actually uses.
Changes
task site:update(pull/up everything). Now pulls onlyphpfpmand runs the export as a one-offdocker compose run --rm --no-deps phpfpm …(drops the Task setup).phpfpm, run viarun --rm --no-deps(matches the templated composer/php/twig workflows; no lingering container, no healthcheck wait).phpfpm elasticsearchand starts them withup --wait --no-deps(Elasticsearch must be a running service the tests connect to).--no-depsstopsphpfpm'smariadb/rabbitdepends_onfrom starting the rest of the stack.Validation
ApiTestCaseuses the in-process kernel (not real HTTP), so nginx and mariadb aren't needed.docker compose run --rm --no-deps phpfpm …verified locally; YAML prettier-clean.Audit note
The templated workflows (
composer,php,twig→run --rm phpfpm;markdown→markdownlint;yaml→prettier) andbuild_release(run --rm phpfpm) were already scoped;changelogandindex-mapping-driftuse no containers. Only the repo-ownedapi-spec.ymlandpr.yamlover-pulled.