Overview

Disruptions in the past ~30 days

This previously used to be rare. Each of these bring nice refinements, but they're not worth the disruption for in-progress MRs.

Proposed resolution

Adopt a strategy similar to #3462742: CI: use a snapshot of core's phpcs rules as changes in Drupal core will break MRs with limited benefit to module development.

Differences:

  • Core has a far lower PHPStan level, so doesn't run into this. ⇒ the "keep in sync with core" approach of #3462742 does not apply here
  • So instead, pin a specific PHPStan version, and have a GitLab CI job fail that is allowed to fail (to avoid disruption) inform us we should update it.

User interface changes

None.

CI impact: see screenshots in https://git.drupalcode.org/project/canvas/-/merge_requests/1004

Issue fork canvas-3587543

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

wim leers created an issue. See original summary.

wim leers’s picture

Title: Stop CI disruption from phpstan/phpstan and mglaman/phpstan-drupal: pin + CI job to nudge an update » Stop CI disruption from phpstan/phpstan and mglaman/phpstan-drupal: pin versions + introduce nightly `phpstan-is-up-to-date` CI job to nudge updates
Assigned: wim leers » Unassigned
Status: Active » Needs review

Ready for final review. Screenshots of it in action in the MR description.

While working on this, I realized it's also absurdly wasteful to run the existing phpcs-rules-match-drupal-11 CI job plus the new phpstan-is-up-to-date CI job on every commit 🙈😅

Once every 24 hours is more than enough.

wim leers’s picture

Issue summary: View changes

  • wim leers committed 999707a8 on 1.x
    chore(Project management): #3587543 Stop CI disruption from phpstan/...
wim leers’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

longwave made their first commit to this issue’s fork.

longwave’s picture

Status: Fixed » Needs review

Why use messy curl/jq when Composer can just do this for us?

longwave’s picture

Or, just ship a lockfile, which is what we've partially reinvented here.

wim leers’s picture

Issue tags: +AI-accelerated

Or, just ship a lockfile, which is what we've partially reinvented here.

That was what I wanted to do first. But composer does not allow (well, respect) lockfiles in dependencies. It only respects it at the root.

Why use messy curl/jq when Composer can just do this for us?

Fair. For something like this, I just don't care, because it does not matter. This is just meant to support us developers of Canvas. It doesn't run in production, and it could be refined in whichever way we want.

(PHCS rules, PHPStan rules, CI scripts are the only place where I will tolerate AI slop. I did acknowledge explicitly in the commits that this was AI-generated! 😇)

Will test your MR and merge if confirmed to work :)

  • wim leers committed 6533813a on 1.x authored by longwave
    chore(Project management): #3587543 Follow-up: use `composer` instead of...
wim leers’s picture

Status: Needs review » Fixed

Thanks, your improvement is now in! 👍

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.