CI: Fix diff checks for testing chores steps#7132
Open
clemyan wants to merge 1 commit into
Open
Conversation
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'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 diffto check for such modifications, using globs and bash expansion syntax to list the relevant source files, but the args given togit diffare 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 checkThere are also a few more nice-to-not-haves:
gitcommands and awccommand, when a singlegitsufficesHow did you fix it?
Use a single
git diffcommand to check for source modifications, with correct pathspecs.After running regeneration, the output of the final
git diffis not shortened. The full diffs are recorded in the CI logs.I left the check for
plugin-compatpatches unmodified, because that one works correctly and would be moved by #7009 anyway.Checklist