CI builds fail with "does master exist?"
See original GitHub issueAffected Packages
@changesets/cli
@changesets/git
Problem
It seems that 2.13.0
of @changesets/cli
broke our CI builds. (I’m assuming that’s because of the update to @changesets/git
.) We now get this when running changeset status
on PRs:
🦋 error Error: Failed to find where HEAD diverged from master. Does master exist?
🦋 error at getDivergedCommit (/opt/hostedtoolcache/node/12.20.1/x64/lib/node_modules/@changesets/cli/node_modules/@changesets/git/dist/git.cjs.dev.js:58:11)
🦋 error at async getChangedFilesSince (/opt/hostedtoolcache/node/12.20.1/x64/lib/node_modules/@changesets/cli/node_modules/@changesets/git/dist/git.cjs.dev.js:169:22)
🦋 error at async Object.getChangedPackagesSinceRef (/opt/hostedtoolcache/node/12.20.1/x64/lib/node_modules/@changesets/cli/node_modules/@changesets/git/dist/git.cjs.dev.js:208:24)
🦋 error at async getStatus (/opt/hostedtoolcache/node/12.20.1/x64/lib/node_modules/@changesets/cli/dist/cli.cjs.dev.js:953:27)
🦋 error at async run$1 (/opt/hostedtoolcache/node/12.20.1/x64/lib/node_modules/@changesets/cli/dist/cli.cjs.dev.js:1197:11)
We’re running this on Ubuntu machines (“latest” version) in Azure Pipelines. Couldn’t reproduce the problem locally.
Confirmed that installing @changesets/cli
version 2.12.0
fixed the problem.
Proposed solution
🤷♂️ No clue. Let me know if there is other info I can provide to help debug. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:40 (24 by maintainers)
Top Results From Across the Web
CI builds fail with "does master exist?" · Issue #517 - GitHub
We now get this when running changeset status on PRs: error Error: Failed to find where HEAD diverged from master. Does master exist?...
Read more >How to avoid broken master with Pipelines for Merged Results ...
Broken master. This can happen when CI pipelines run on the master branch, but don't pass all tests. A red cross mark is...
Read more >Common Build Problems - Travis CI Docs
One possible cause for builds failing unexpectedly can be calling set -e (also known as set errexit ), either directly in your .travis.yml...
Read more >Why is my Travis CI build failing with "File Not Found" errors ...
Can anyone see any other reason that the checked-out files, being referenced by absolute paths, should not exist? travis-ci · pytest · Share....
Read more >Configuration of your jobs with .gitlab-ci.yml
When enabled and the job fails, the pipeline will be successful/green for all intents and purposes, but a "CI build passed with warnings"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those of you struggling with this in GitHub Actions workflows triggered by pull requests, here’s what works for me:
main
into your branch. Also get the full commit history.main
locally, so refer to it asorigin/main
in thechangeset status
command.For anyone struggling with this in GitLab, I ended up using this in my job:
Please let me know if there’s any major downsides to this approach that I am not aware of 😬