Skip to content

Skip the vendor checks on branches with no composer.json - #18

Closed
darksidemilk wants to merge 1 commit into
mainfrom
ci-vendor-job-skips-when-absent
Closed

Skip the vendor checks on branches with no composer.json#18
darksidemilk wants to merge 1 commit into
mainfrom
ci-vendor-job-skips-when-absent

Conversation

@darksidemilk

Copy link
Copy Markdown
Member

What

Gate the vendor job's steps on packages/web/composer.json actually being present, so branches without one skip loudly instead of failing.

Worth merging before the next dev-branch PR — right now every one of them is red.

Why

The vendor job added in #16 assumes packages/web/composer.json exists. It does on working-1.6, where the dependency manager landed. It does not on dev-branch, and not on any branch cut before that. So the very first step fails:

Run composer validate
./composer.json not found.
##[error]Process completed with exit code 3.

That turned every dev-branch pull request red the moment #16 merged — first observed on fogproject#1161, which was the first dev-branch PR opened after 16:27 UTC.

It isn't a real finding on those branches. The absence is correct there, and the only way to make the check pass for real would be to port the whole dependency manager to the 1.5.x line — a decision with nothing to do with whether any given PR is sound.

Approach

Detect the manifest once after checkout, then gate the PHP setup, composer validate, composer install, the content comparison and the drift report on it. When it's missing the job emits a ::warning:: plus a step-summary line saying so, and passes.

Skip loudly rather than fail — or silently pass — because that's what this repo already does with exactly this class of problem. update-lang-fix-psr-and-sync-version.yml skips update-language.sh with a ::warning:: on branches that predate it, "rather than failing the whole job on a branch nobody can fix without rebasing". Same reasoning, same shape.

The drift report keeps its always(), so it still reports after a failed content comparison. It just also requires the manifest, since Composer was never installed in the skip case and that step shells out to composer --version.

Verified

  • actionlint clean.
  • Guard evaluated against both real branches: present=true on working-1.6, present=false on dev-branch.
  • Nothing changes on working-1.6 — the manifest is there, so every step runs exactly as before. If the 1.5.x line ever gains a composer.json, this starts checking it with no further change here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PqufBbuckux8kitJeW3uAK

The vendor job added in #16 assumes packages/web/composer.json exists. It
does on working-1.6, where the dependency manager landed. It does not on
dev-branch, and does not on any branch cut before that -- so `composer
validate` answers "./composer.json not found." and exits 3, and the job
fails.

That turned every dev-branch pull request red the moment #16 merged. It is
not a real finding on those branches: the absence is correct there, and the
only way to make the check pass for real would be to port the whole
dependency manager to the 1.5.x line, which is a decision that has nothing
to do with whether a given PR is sound.

So detect the manifest once after checkout and gate the PHP setup, validate,
install, comparison and drift report on it. When it is missing the job emits
a ::warning:: and a step-summary line saying it was skipped, then passes.

Skip loudly rather than fail, or silently pass, because that is what this
repo already does with the same class of problem: the generated-files sweep
skips update-language.sh with a ::warning:: on branches that predate it,
"rather than failing the whole job on a branch nobody can fix without
rebasing". Same reasoning, same shape.

Nothing changes on working-1.6: the manifest is there, every step runs as
before. If the 1.5.x line ever gains a composer.json this starts checking it
with no further change here.

The drift report keeps its always() so it still reports after a failed
content comparison -- it just also requires the manifest, since composer was
never installed in the skip case and that step shells out to
`composer --version`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PqufBbuckux8kitJeW3uAK
@darksidemilk

Copy link
Copy Markdown
Member Author

Superseded by #19, which landed the same guard (detect packages/web/composer.json after checkout, gate the composer steps on it, skip with a step-summary note otherwise). Same reasoning, same shape, already on main — nothing here to add. Closing.

@darksidemilk
darksidemilk deleted the ci-vendor-job-skips-when-absent branch August 18, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant