Skip to content

CI: Fix diff checks for testing chores steps#7132

Open
clemyan wants to merge 1 commit into
masterfrom
clemyan/fix-testing-chores-checks
Open

CI: Fix diff checks for testing chores steps#7132
clemyan wants to merge 1 commit into
masterfrom
clemyan/fix-testing-chores-checks

Conversation

@clemyan

@clemyan clemyan commented May 12, 2026

Copy link
Copy Markdown
Member

What's the problem this PR addresses?

In the "Testing chores" job in our CI, there are a number of checks that regenerate artifacts from source and check whether the results match the committed artifacts. Most of these only run if the source files used in the generation are modified by the PR.

We run git diff to check for such modifications, using globs and bash expansion syntax to list the relevant source files, but the args given to git diff are pathspecs, which behave closer wildcards than globs. In particular, *s matches any string of characters (including / and .) and there are no brace expansions. See this action run for a PR that modified the PnP hooks without triggering the regeneration check

There are also a few more nice-to-not-haves:

  • For each check we spawn 2 git commands and a wc command, when a single git suffices
  • If we run the regeneration and find differences, the logs doesn't show what those differences are

How did you fix it?

Use a single git diff command to check for source modifications, with correct pathspecs.

After running regeneration, the output of the final git diff is not shortened. The full diffs are recorded in the CI logs.

I left the check for plugin-compat patches unmodified, because that one works correctly and would be moved by #7009 anyway.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@clemyan clemyan requested a review from arcanis as a code owner May 12, 2026 16:24
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