ci: let the psalm baseline workflow fork and commit only the baseline - #8124
Open
maia-andre wants to merge 1 commit into
Open
ci: let the psalm baseline workflow fork and commit only the baseline#8124maia-andre wants to merge 1 commit into
maia-andre wants to merge 1 commit into
Conversation
psalm --threads=$(nproc) forks its workers with pcntl_fork(), which the runner's php.ini lists in disable_functions, so the update-baseline step has been crashing since 2026-08-20. As the step has continue-on-error, the job went on and committed the only change left in the tree, the composer.lock rewrite from the nextcloud/ocp install, producing "Update psalm-baseline.xml" PRs that never touched the baseline. Re-enable the pcntl functions as psalm.yml and the other workflows already do, and restrict the pull request to tests/psalm-baseline.xml. Fixes LibreSign#8122 Assisted-by: Claude Code:claude-fable-5 Signed-off-by: André Maia <andrefnkmm@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 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.
Resolves: #8122
📝 Summary
update-psalm-baseline.ymlhas been crashing on every scheduled run since around 2026-08-20:psalm --threads=$(nproc)forks its workers withpcntl_fork(), which the runner's php.ini lists indisable_functions. Because the step hascontinue-on-error: true, the job carried on andcreate-pull-requestcommitted the only thing that had changed in the tree — thecomposer.lockrewrite fromcomposer require nextcloud/ocp:dev-*— so the recent "Update psalm-baseline.xml" PRs (#8052, #8064, #8083, #8084, #8093, #8118, #8119) never contained baseline changes. Details and evidence in #8122.Two lines, both with precedent in this repository:
ini-values: disable_functions=onsetup-php, aspsalm.ymland the phpunit/behat/playwright/infection workflows already do, so Psalm can fork;add-paths: tests/psalm-baseline.xmloncreate-pull-request, so only the baseline is committed and no PR is opened when it did not change.Left out on purpose:
team-reviewers: server-backendstill fails withReviews may only be requested from collaboratorsand will keep marking the run as failed even after this fix. Removing it or pointing it to an existing team is an org-level decision, so it is not part of this PR.🧪 How to test
Both versions were run on my fork via
workflow_dispatch, with the fork'smain/stable32–stable34synced to upstream:pcntl_fork()in all four jobs;git statusafter Psalm, and the PR step disabled since the fork has noCOMMAND_BOT_PAT): https://github.com/maia-andre/libresign/actions/runs/33266307137 — Psalm saves the baseline in all four jobs. Afterwardsmainhas onlycomposer.lockmodified (so no PR would be opened),stable32/stable33onlytests/psalm-baseline.xml,stable34both.After merge, the next scheduled run (02:05 UTC) should open PRs only for branches whose baseline actually changed, containing only
tests/psalm-baseline.xml. #8118 and #8119 only bumpcomposer.lockand can be closed.✅ Checklist
🤖 AI (if applicable)