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 flag and project dependencies #32070

Closed
andreicherechesbyx opened this issue Aug 8, 2024 · 3 comments · Fixed by #32094
Closed

[Bug]: --only-changed flag and project dependencies #32070

andreicherechesbyx opened this issue Aug 8, 2024 · 3 comments · Fixed by #32094
Assignees
Labels

Comments

@andreicherechesbyx
Copy link

Version

1.46.0

Steps to reproduce

  1. Create a repo with multiple projects
  2. Add dependencies to the project
  3. Modify some of the test files
  4. Run test with --only-changed flag

Expected behavior

The dependencies are run before the actual modified tests.

Actual behavior

Only the modified test are run, which fail without the dependencies.

Additional context

I have multiple projects with a login setup as dependency

Environment

System:
    OS: macOS 14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Memory: 15.41 MB / 16.00 GB
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.40.1 => 1.46.0
@Skn0tt
Copy link
Member

Skn0tt commented Aug 9, 2024

Hi Andrei! Thanks for reporting the issue. I'm having trouble reproducing this on my end. Could you provide me with a reproduction repository, as the issue form requested?

@andreicherechesbyx
Copy link
Author

Repo: https://github.com/boatyardx/playwright-crossbrowser/tree/only-changed

I added a console.log() statement:

image

While the change to console.log() was detected, the setup dependency was not updated:

image

Also, is it intended for the entire test file to run instead of only the modified test?

@Skn0tt
Copy link
Member

Skn0tt commented Aug 12, 2024

Thanks, that helps reproducing! I'll look into writing a fix.

Also, is it intended for the entire test file to run instead of only the modified test?

Yes, that's intended.

Skn0tt added a commit that referenced this issue Aug 12, 2024
…iles (#32094)

Closes #32070. We were
applying `additionalFileMatcher` not just to `filteredProjectSuites`,
but also to `projectSuites`. `projectSuites` is where we take dependency
projects from, though - so `--only-changed` led to empty dependency
projects, resulting in the reported bug.

The fix is to only apply `additionalFileMatcher` on
`filteredProjectSuites`.
Skn0tt added a commit to Skn0tt/playwright that referenced this issue Aug 15, 2024
…iles (microsoft#32094)

Closes microsoft#32070. We were
applying `additionalFileMatcher` not just to `filteredProjectSuites`,
but also to `projectSuites`. `projectSuites` is where we take dependency
projects from, though - so `--only-changed` led to empty dependency
projects, resulting in the reported bug.

The fix is to only apply `additionalFileMatcher` on
`filteredProjectSuites`.
Skn0tt added a commit that referenced this issue Aug 15, 2024
…-only-changed` test files (#32172)

Closes #32070. We were
applying `additionalFileMatcher` not just to `filteredProjectSuites`,
but also to `projectSuites`. `projectSuites` is where we take dependency
projects from, though - so `--only-changed` led to empty dependency
projects, resulting in the reported bug.
    
The fix is to only apply `additionalFileMatcher` on
`filteredProjectSuites`.
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants