Skip to content

Build the reflex-release test repository once per session - #7575

Open
quotentiroler wants to merge 1 commit into
reflex-dev:mainfrom
quotentiroler:perf/reflex-release-repo-template
Open

quotentiroler wants to merge 1 commit into
reflex-dev:mainfrom
quotentiroler:perf/reflex-release-repo-template

Conversation

@quotentiroler

@quotentiroler quotentiroler commented Oct 15, 2026 •

Copy link
Copy Markdown

Type of change

Test-only performance change (needs the skip-changelog label).

The repo fixture in tests/units/reflex_release/conftest.py created a fresh git repository for each of the 480 reflex_release tests: git remote get-url (via towncrier_config_toml), git init, git add -A and git commit. A session-scoped repo_template fixture now builds that repository once, and repo copies it into tmp_path, so each test still gets its own isolated repository with identical contents.

Measured:

  • Windows (Python 3.14): fixture 510 ms to 73 ms per test; tests/units/reflex_release 248.6 s to 116.5 s. The Windows unit-test jobs run this suite twice each.
  • Linux (python:3.12 container): fixture 27 ms to 16 ms, about 5 s per suite run.

The same 480 test ids are collected before and after and all pass.

  • Have you successfully ran tests with your changes locally?

View guided diff

The `repo` fixture created a fresh git repository for each of the ~480
reflex_release tests: `git remote get-url` (via towncrier_config_toml),
`git init`, `git add -A` and `git commit`. A session-scoped
`repo_template` fixture now builds that repository once and `repo`
copies it into `tmp_path`, so each test still gets its own isolated
repository with identical contents and history shape.

Measured locally (Windows, Python 3.14):
- fixture: 510 ms -> 73 ms per test
- tests/units/reflex_release: 248.6 s -> 116.5 s, setup phase ~187 s -> 33 s
On Linux (python:3.12 container) the fixture goes 27 ms -> 16 ms, about
5 s per suite run.

The same 480 test ids are collected before and after and all pass.
@quotentiroler
quotentiroler requested a review from a team as a code owner October 15, 2026 08:28

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Builds the test repository once with session-scoped repo_template, then copies it for each test.

  • Release tests build their Git repository once and copy it per test.

Reviews (1) · Last reviewed commit: "Build the reflex-release test repository..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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 this pull request may close these issues.

1 participant