Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ jobs:
- name: Pre-install reflex-web git dependencies (outside sfw)
working-directory: ./reflex-web
run: |
# Replace reflex-dev/reflex git deps with plain package names (PR version is pre-installed)
sed -i -E 's|"([a-zA-Z0-9_-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml
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.

P2 sed regex excludes dots from package name character class

The capture group [a-zA-Z0-9_-]+ does not include ., which is a valid character in Python distribution names per PEP 508. No reflex-dev/reflex packages currently use dots in their names, but if one ever does (e.g. a namespaced package), this substitution would silently fail to strip the git URL, causing uv pip compile to resolve the pinned remote version instead of the locally-installed PR version.

Consider widening the character class to [a-zA-Z0-9_.-]+:

Suggested change
sed -i -E 's|"([a-zA-Z0-9_-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml
sed -i -E 's|"([a-zA-Z0-9_.-]+)\s*@\s*git\+https://github\.com/reflex-dev/reflex@[^"]*"|"\1"|g' pyproject.toml

# Install git+https deps from pyproject.toml before pip compile resolves them.
# Exclude reflex itself — the PR version is already installed.
grep -oP 'git\+https://[^"'"'"']+' pyproject.toml | grep -v 'reflex-dev/reflex\.git' | sort -u > git-requirements.txt || true
grep -oP 'git\+https://[^"'"'"']+' pyproject.toml | sort -u > git-requirements.txt || true
if [ -s git-requirements.txt ]; then
echo "Installing git dependencies:"
cat git-requirements.txt
Expand All @@ -194,6 +196,13 @@ jobs:
if [ -s requirements.txt ]; then
sfw uv pip install -r requirements.txt
fi
- name: Verify installed reflex version matches this checkout
run: |
expected_sha="$(git rev-parse --short=8 HEAD)"
installed_version="$(uv run --active --no-sync python -c 'import importlib.metadata as metadata; print(metadata.version("reflex"))')"
echo "Expected checkout SHA: $expected_sha"
echo "Installed reflex version: $installed_version"
[[ "$installed_version" == *"+$expected_sha" ]]
- name: Init Website for reflex-web
working-directory: ./reflex-web
run: uv run --active --no-sync reflex init
Expand Down
Loading