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 referenced this issue in cloudquery/cloudquery Sep 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@playwright/test](https://playwright.dev) ([source](https://togithub.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://togithub.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://togithub.com/microsoft/playwright/releases/tag/v1.46.1)

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

##### Highlights

[https://github.com/microsoft/playwright/issues/32004](https://togithub.com/microsoft/playwright/issues/32004) - \[REGRESSION]: Client Certificates don't work with Microsoft IIS[https://github.com/microsoft/playwright/issues/32004](https://togithub.com/microsoft/playwright/issues/32004)4 - \[REGRESSION]: Websites stall on TLS handshake errors when using Client Certificate[https://github.com/microsoft/playwright/issues/32146](https://togithub.com/microsoft/playwright/issues/32146)46 - \[BUG]: Credential scanners warn about internal socks-proxy TLS certificat[https://github.com/microsoft/playwright/issues/32056](https://togithub.com/microsoft/playwright/issues/32056)056 - \[REGRESSION]: 1.46.0 (TypeScript) - custom fixtures extend no longer chaina[https://github.com/microsoft/playwright/issues/32070](https://togithub.com/microsoft/playwright/issues/32070)2070 - \[Bug]: --only-changed flag and project dependen[https://github.com/microsoft/playwright/issues/32188](https://togithub.com/microsoft/playwright/issues/32188)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://togithub.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