deps(api): Upgrade pytest to 9.0.3 and swap in pytest-lazy-fixtures - #8375
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docker builds report
|
❌ private-cloud · depot-ubuntu-latest-16 — run #19820 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise 🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19822 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19820 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19822 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19820 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19822 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19822 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19820 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19818 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19818 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Skipped testsfirefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss ✅ oss · depot-ubuntu-latest-arm-16 — run #19818 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19818 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## chore/api-pyfakefs-6 #8375 +/- ##
=====================================================
Coverage 98.80% 98.80%
=====================================================
Files 1619 1619
Lines 65682 65682
=====================================================
Hits 64898 64898
Misses 784 784 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Visual Regression19 screenshots compared. See report for details. |
8b90483 to
2d588a4
Compare
a1ea697 to
3bca1f3
Compare
Pull Request is not mergeable
2d588a4 to
2e7c088
Compare
3bca1f3 to
3864a52
Compare
Pull Request is not mergeable
Pull Request is not mergeable
Pull Request is not mergeable
1.6 pinned `clickhouse-driver==0.2.10` while the api requires 0.2.11, so resolution only succeeded via a `clickhouse-driver` override plus a git pin on the unreleased fix commit. Overrides don't propagate to consumers, so any project depending on flagsmith-api could not resolve it at all. 2.0 pins `clickhouse-driver==0.2.11` itself, so both workarounds go. Ref: jayvynl/django-clickhouse-backend#172
`flagsmith-common[test-tools]` has required `pyfakefs>=6,<7` since 3.13.1, but the api capped it at `<6.0.0` and pinned `==5.7.4` via an override. The override kept the api resolvable while leaving the declared metadata contradictory, so consumers of flagsmith-api could not resolve the two together. Ref: #8368
The dev extra has declared `pytest>=9.0.3,<9.1.0` since #7689 landed the CVE-2025-71176 fix, but `override-dependencies` pinned `pytest==7.2.2`, which silently cancelled it — the lock still resolved 7.2.2, so the security update never took effect and the suite ran on an affected version. pytest-lazy-fixture is unmaintained and breaks on pytest 8+, which is what the pin was really holding back. Replace it with the maintained pytest-lazy-fixtures fork, aliasing `lf` to `lazy_fixture` so the 295 call sites are untouched. `pluggy` was pinned below the 1.5 that pytest 9 needs for `HookimplOpts`, so that override goes too. Ref: GHSA-6w46-j5rx-g56g
0.12 migrates the private test suite off pytest-lazy-fixture. `make integrate-private-tests` clones this repo at the released tag matching the installed version, so without the bump `tests/rbac_tests` fails collection on `ModuleNotFoundError: No module named 'pytest_lazyfixture'`.
2e7c088 to
3f0a34d
Compare
8b4e666 to
b591e0e
Compare
Pull Request is not mergeable
Pull Request is not mergeable
Pull Request is not mergeable
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Stacked on #8374.
In this PR, we remove the
pytest==7.2.2dependency override.What the pin was really holding back is
pytest-lazy-fixture, which is unmaintained and breaks on pytest 8+ (AttributeError: 'CallSpec2' object has no attribute 'funcargs'). Here, we swap it for the maintainedpytest-lazy-fixturesfork, aliasing itslftolazy_fixtureon import to keep the diff minimal.How did you test this code?
Green CI should suffice.