community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

🔧 Repository: Error: Command 'git diff --name-only origin/main...' failed with code 128

Open awanlin opened this issue 7 months ago • 6 comments

📜 Description

We are currently seeing the following error when the CI starts for PR:

fatal: origin/main...HEAD: no merge base
Error: Command 'git diff --name-only origin/main...' failed with code 128
    at runPlain (file:///home/runner/work/community-plugins/community-plugins/scripts/ci/list-workspaces-with-changes.js:26:[11](https://github.com/backstage/community-plugins/actions/runs/10095240140/job/27914902436?pr=730#step:6:12))
    at async main (file:///home/runner/work/community-plugins/community-plugins/scripts/ci/list-workspaces-with-changes.js:42:7)

The current workaround is to close the PR, wait 10 seconds, and then open it again.

👍 Expected behavior

There should be no error and the CI moves forward as expected

👎 Current Behavior

The CI doesn't start and fails with this error:

fatal: origin/main...HEAD: no merge base
Error: Command 'git diff --name-only origin/main...' failed with code 128
    at runPlain (file:///home/runner/work/community-plugins/community-plugins/scripts/ci/list-workspaces-with-changes.js:26:[11](https://github.com/backstage/community-plugins/actions/runs/10095240140/job/27914902436?pr=730#step:6:12))
    at async main (file:///home/runner/work/community-plugins/community-plugins/scripts/ci/list-workspaces-with-changes.js:42:7)

👟 Reproduction steps

Not really sure hot to reproduce right now, it's a bit random but seem more frequent recently.

📃 Provide the context for the Bug.

This blocks PR and is confusion for Contributors as it's not related to their changes

👀 Have you spent some time to check if this bug has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

awanlin avatar Jul 25 '24 14:07 awanlin