Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: --only-changed with shallow clone throws "unknown revision" error #32188

Closed
Skn0tt opened this issue Aug 16, 2024 · 0 comments · Fixed by #32189
Closed

[Bug]: --only-changed with shallow clone throws "unknown revision" error #32188

Skn0tt opened this issue Aug 16, 2024 · 0 comments · Fixed by #32189
Assignees

Comments

@Skn0tt
Copy link
Member

Skn0tt commented Aug 16, 2024

We're seeing some reports on Discord about users trying out --only-changed in CI, and being surprised about the "unknown revision" error thrown by Git. This occurs on shallow clones, which is the default for GH Actions. We should detect this and show a nice error message.

Example report from Discord:

Hi! I have a problem with new feature only-changed. I’m using gitlab and I want to use this option when I create new MR.
But I get a error like this:

npx playwright test --grep-invert '@fetch|@no-ci' --project=chromium --only-changed=main --reporter=line
Error: Cannot detect changed files for --only-changed mode:
git diff origin/main --name-only
fatal: ambiguous argument 'main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

Any idea what i’m doing wrong?

@Skn0tt Skn0tt self-assigned this Aug 16, 2024
@Skn0tt Skn0tt closed this as completed in 06ffdd6 Aug 16, 2024
kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this issue Sep 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@playwright/test](https://playwright.dev) ([source](https://github.com/microsoft/playwright)) | devDependencies | patch | [`1.46.0` -> `1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.46.0/1.46.1) |
| [@playwright/test](https://playwright.dev) ([source](https://github.com/microsoft/playwright)) | devDependencies | minor | [`1.45.3` -> `1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.45.3/1.46.1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

### [`v1.46.1`](https://github.com/microsoft/playwright/releases/tag/v1.46.1)

[Compare Source](https://github.com/microsoft/playwright/compare/v1.46.0...v1.46.1)

##### Highlights

[microsoft/playwright#32004 - \[REGRESSION]: Client Certificates don't work with Microsoft IIS[microsoft/playwright#32004 - \[REGRESSION]: Websites stall on TLS handshake errors when using Client Certificate[microsoft/playwright#32146 - \[BUG]: Credential scanners warn about internal socks-proxy TLS certificat[microsoft/playwright#32056 - \[REGRESSION]: 1.46.0 (TypeScript) - custom fixtures extend no longer chaina[microsoft/playwright#32070 - \[Bug]: --only-changed flag and project dependen[microsoft/playwright#32188 - \[Bug]: --only-changed with shallow clone throws "unknown revision" error

##### Browser Versions

-   Chromium 128.0.6613.18
-   Mozilla Firefox 128.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 127
-   Microsoft Edge 127

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant