Skip to content

ci: let the psalm baseline workflow fork and commit only the baseline - #8124

Open
maia-andre wants to merge 1 commit into
LibreSign:mainfrom
maia-andre:ci/8122-psalm-baseline-pcntl
Open

ci: let the psalm baseline workflow fork and commit only the baseline#8124
maia-andre wants to merge 1 commit into
LibreSign:mainfrom
maia-andre:ci/8122-psalm-baseline-pcntl

Conversation

@maia-andre

Copy link
Copy Markdown
Contributor

Resolves: #8122

📝 Summary

update-psalm-baseline.yml has been crashing on every scheduled run since around 2026-08-20: psalm --threads=$(nproc) forks its workers with pcntl_fork(), which the runner's php.ini lists in disable_functions. Because the step has continue-on-error: true, the job carried on and create-pull-request committed the only thing that had changed in the tree — the composer.lock rewrite from composer 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= on setup-php, as psalm.yml and the phpunit/behat/playwright/infection workflows already do, so Psalm can fork;
  • add-paths: tests/psalm-baseline.xml on create-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-backend still fails with Reviews may only be requested from collaborators and 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's main/stable32stable34 synced to upstream:

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 bump composer.lock and can be closed.

✅ Checklist

🤖 AI (if applicable)

  • The content of this PR was partially or fully generated using AI

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-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
see 209 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 0. Backlog

Development

Successfully merging this pull request may close these issues.

Update Psalm baseline workflow crashes on pcntl_fork() and opens PRs that only change composer.lock

2 participants