Skip to content

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Feb 14, 2021

See individual git commit messages.

Amusingly, we have to say "not a cherry pick" on this PR because one of the commits is a standalone commit (not a cherry pick) to enable the mandatory cherry pick checker on this branch. Also, the commit message from the initial github action commit contains some fake cherry pick messages, which causes the checker to fail the test (because the commits they refer to do not exist).

bot:notacherrypick

This will replace the old "Signed-off-by checker" and "Commit email
checker".  Both of those checks are now subsumed into this Github
Action, and we also introduce a new functionality: checking the
"cherry picked from commit xyz" messages (slightly obfuscated here in
the commit message so that it does not cause the test to fail!).

1. If a `cherry picked from commit abc123` message is found in a git
   commit message, verify that that commit actually exists in the main
   Open MPI repo.  If it doesn't, fail the CI test.
2. The config file in the git repo
   `.github/workflows/git-commit-checks.json` indicates whether
   cherry-pick messages are _required_ in commit messages.
    1. The contents of that file on the target branch determine
       whether cherry pick messages are required on that branch or
       not.  Meaning: we'll set the contents of that file to _not_
       require cherry pick messages on master.  When we branch for
       releases, we change that config file on the new branch to
       require cherry pick messages.
    2. When cherry pick messages are required and the PR contains
       commits that do not have cherry pick messages, fail the CI
       test.
    3. When cherry-pick messages are required, Reverts, Merge commits,
       and commits that are entirely comprised of submodule updates
       are explicitly excluded from this requirement.  Example:
        1. A PR is created to a target branch with the cherry pick
           message requirement is enabled.
        2. The PR branch contains commits with `(cherry picked from
           commit ....)` messages, and the commit hashes mentioned all
           exist on master.
        3. The PR branch contains a Revert commit.
        4. The PR branch contains a Merge commit.
        5. The CI test will pass.
    4. If a magic token is present in the PR description (e.g.,
       `bot:notacherrypick`), then the requirement for cherry pick
       messages is disabled for all commits on that PR.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit f54b614)
Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit d4d1bcf)
@jsquyres jsquyres force-pushed the pr/v4.1.x/git-commit-checker-github-action branch from aaedb3d to 2f042fb Compare February 14, 2021 19:17
@bwbarrett
Copy link
Member

bot:aws:retest; looks like git was having a bad day for some reason.

@jsquyres jsquyres marked this pull request as ready for review February 18, 2021 20:11
@jsquyres jsquyres merged commit 3230c11 into open-mpi:v4.1.x Feb 18, 2021
@jsquyres jsquyres deleted the pr/v4.1.x/git-commit-checker-github-action branch February 18, 2021 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants