[Maintainers] New `[no important files changed]` flag added

When you merge a track PR that touches an exercise, it triggers the latest published iteration of students’ solutions to be re-tested. For popular exercises, this is a very expensive operation (70,000 test runs for Python Hello World as an extreme!).

We’ve added a new flag ([no important files changed]) which you can add to PR messages to stop tests rerunning. This flag has the effect of telling our system that the latest version of the exercise is identical to the previous version. Please wait 10 minutes after using this flag before merging another PR.

We’ve also added some further logic to avoid rerunning tests if only docs change

To explain the current logic (in both directions)

Solutions will not be retested if EITHER:

  • You only touch docs, hints, .meta, or other files that users don’t interact with.
  • You add [no important files changed] into the PR’s commit body

Solutions will be retested if BOTH:

  • The PR touches one of the following files for an exercise:
    • test files
    • editor files
    • invalidator files
  • The PR was merged without adding the text [no important files changed] into the PR’s commit body

Some examples:

  • Python#3423: Only touches docs so no tests were run
  • Python#3437: Was merged with [no important files changed] added, so no tests were run
  • Csharp#2138: Whitespace was removed from tests. The keyword was not added. Tests were re-run unnecessarily.

@ErikSchierboom will be adding this to the docs shortly. Please let me know how we can make things clearer if they’re not already :slight_smile:


What happens if a PR does contain the magic string and the test file is changed? Does touching the important file override the test directive?

1 Like

No, the directive exists to override the file changing. For example, it’s a way of letting the system know it can safely ignore the whitespace change in a test file.

(Edit: Updated the OP with “both” and “either” for clarity)

1 Like

Dumb question here : How do I add the [no important files changed] to the commit body after a PR has been submitted? Do I have to do a re-commit?

Re-Edited to add: It is available to those who have merge permissions on a repo after the [Squash and Merge] button has been pressed:

Which should result in:

Isn’t it just editing the PR description? Not amending commit messages?

Yeah, you just put it in the description textarea when you merge.

Right, the commit message of the PR.

Loom | Free Screen & Video Recording Software | Loom :slight_smile:

1 Like

Not so much a matter of clarity as of user friendliness:

It is easy to forget to add [no important files changed]. (E.g.)

I wonder whether its behavior could sensibly be made the default, or whether an automatic prompt on PRs could be added?

1 Like

Locally you can make a template message for commits for Exercism projects.

I never use git commit -m 'some message' so I always get my templates to come in. Instead, I use git commit -v so that it opens up my editor and shows the changes made, so I can tell the story I want to tell. Having a template means I uncomment the things I need, to get the things I want for that commit.