Closed
Description
Something has happened to the source checker task, e.g. python/cpython#21748
Run if [ -z "GITHUB_BASE_REF" ]; then
if [ -z "GITHUB_BASE_REF" ]; then
echo '::set-output name=run_tests::true'
else
git fetch origin $GITHUB_BASE_REF --depth=1
git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
fi
shell: /bin/bash -e {0}
From https://github.com/python/cpython
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
fatal: origin/master...HEAD: no merge base
I'm not sure what this error means, but because the failure is treated as a success, the checks decide they don't need to run and so we get all green with no CI!
Metadata
Metadata
Assignees
Labels
No labels
Activity
brettcannon commentedon Aug 7, 2020
Did we shove all of these into a single file with this trick due to requiring status checks that don't get run blocks a PR?
vstinner commentedon Aug 10, 2020
I confirmed that it worked well since May ( https://bugs.python.org/issue40548 ) but it started to fail with
fatal: origin/master...HEAD: no merge base. I'm not sure why it stopped working.I'm not sure if
git fetchfails or ifgit difffails.cc @FFY00
vstinner commentedon Aug 10, 2020
I understood that @FFY00 chose to use a separated job to check if a PR is a "doc only" to easy maintenance of the check: the job uses Linux and reuses services like
uses: actions/checkout@v2(rather than having to implement the check for Windows, macOS, Linux, ...)The advantage is to not even start other jobs if it's a doc-only PR. It reduces resource consumption.
vstinner commentedon Aug 10, 2020
Oh! I can reproduce the issue with Git 2.28 (on Fedora Rawhide), but not with Git 2.26 (Fedora 32). Script to reproduce the issue:
git diff --name-only origin/master...fails withfatal: origin/master...HEAD: no merge base.But
git diff --name-only origin/master..refs/remotes/pull/21748/mergeworks as expected.vstinner commentedon Aug 10, 2020
Difference between 2 dots (..) and 3 dots (...):
https://matthew-brett.github.io/pydagogue/git_diff_dots.html
It seems like using 2 dots should be enough for the workflow job, since GitHub starts by merging master into the PR anyway.
vstinner commentedon Aug 10, 2020
I didn't find any obvious change on the "merge-base" command in the Git 2.28 changelog, but this version contains many changes, so I'm not surprised that the behavior changed.
vstinner commentedon Aug 10, 2020
Git 2.28 changelog:
vstinner commentedon Aug 10, 2020
I proposed python/cpython#21806 to replace "..." (3 dots) with ".." (2 dots).
FFY00 commentedon Aug 10, 2020
Sorry for the delay! I wasn't able to look at this earlier.
See my comment in python/cpython#21806 (comment).
vstinner commentedon Oct 26, 2020
My python/cpython#21806 was merged into master and then backported to 3.8 and 3.9 branches. I close the issue.