Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

On Travis: fatal: Invalid symmetric difference expression master... #312

Open
kasparsd opened this issue Jan 8, 2020 · 6 comments
Open
Labels

Comments

@kasparsd
Copy link
Contributor

kasparsd commented Jan 8, 2020

Some Travis runs use an invalid diff range during travis.install.sh which results in the following error:

$ source "$DEV_LIB_PATH/travis.install.sh"
git diff master...2abbda3a1c6b90a0173e832e250ce2007e3fd074
fatal: Invalid symmetric difference expression master...2abbda3a1c6b90a0173e832e250ce2007e3fd074

See this sample CI run while the previous without the error and could resolve the diff:

4.63s$ source "$DEV_LIB_PATH/travis.install.sh"
git diff master...a6bb9a704a687f08b748c47975cdc753331a7683
Downloading PHPUnit 7 phar
Cloning into '/tmp/wpcs'...
remote: Enumerating objects: 16677, done.
remote: Total 16677 (delta 0), reused 0 (delta 0), pack-reused 16677
Receiving objects: 100% (16677/16677), 3.98 MiB | 17.65 MiB/s, done.
Resolving deltas: 100% (11626/11626), done.

Note that both are valid ranges:

@kasparsd kasparsd added the bug label Jan 8, 2020
@kasparsd
Copy link
Contributor Author

kasparsd commented Jan 8, 2020

This could be a Travis issue, too. I'm not sure.

@kasparsd
Copy link
Contributor Author

OK, so this happens only for merge commits like WordPress/application-passwords@2abbda3 (here is the Travis CI run for that commit).

@kasparsd
Copy link
Contributor Author

Per https://help.github.com/en/github/committing-changes-to-your-project/commit-exists-on-github-but-not-in-my-local-clone

The branch that contains the commit was deleted, so the commit is no longer referenced.

@kasparsd
Copy link
Contributor Author

Re-opening since we should probably return a non-zero exit code when this happens. Otherwise the builds appear to pass.

@kasparsd kasparsd reopened this May 18, 2020
@irmalcol
Copy link

irmalcol commented Nov 6, 2020

I'm also getting this error on Travis builds triggered by GitHub pull requests using the travis.install.sh script. Sometimes the error shows up and sometimes it doesn't. I have not been able to reliably reproduce or avoid the conditions that cause the error to present itself.

git diff master...b5420ec79e7ad76b5fb9d1b743ae35c01c5f82b0
fatal: Invalid symmetric difference expression master...b5420ec79e7ad76b5fb9d1b743ae35c01c5f82b0

This has actually been a problem for a few years now, but I just found this GitHub issue. @kasparsd, were you ever able to determine whether this was a user-related configuration problem, a Travis problem, or a problem with the check-diff.sh script?

@AdrienStrathcom
Copy link

@kasparsd, you might want to check out the following Travis bug:

travis-ci/travis-ci#2666

I've been digging into this with @irmalcol, and it seems like this bug is still an issue, despite the Travis team closing the bug. We're trying a workaround along the lines of what's mentioned in the bug:

before_install:
    - export TRAVIS_COMMIT=$(git rev-parse FETCH_HEAD)

Preliminary results look promising, but the issue was intermittent, so need to keep an eye on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants