Skip the vendor checks on branches with no composer.json - #18
Closed
darksidemilk wants to merge 1 commit into
Closed
Skip the vendor checks on branches with no composer.json#18darksidemilk wants to merge 1 commit into
darksidemilk wants to merge 1 commit into
Conversation
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
Member
Author
|
Superseded by #19, which landed the same guard (detect |
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.
What
Gate the
vendorjob's steps onpackages/web/composer.jsonactually 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
vendorjob added in #16 assumespackages/web/composer.jsonexists. It does onworking-1.6, where the dependency manager landed. It does not ondev-branch, and not on any branch cut before that. So the very first step fails:That turned every
dev-branchpull 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.ymlskipsupdate-language.shwith 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 tocomposer --version.Verified
actionlintclean.present=trueonworking-1.6,present=falseondev-branch.working-1.6— the manifest is there, so every step runs exactly as before. If the 1.5.x line ever gains acomposer.json, this starts checking it with no further change here.🤖 Generated with Claude Code
https://claude.ai/code/session_01PqufBbuckux8kitJeW3uAK