ci: Update CLI help command tests for cross-platform consistency#9515
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughReplaced OS-specific Python invocations in the cross-platform GitHub Actions workflow’s CLI help test steps with a unified uv run python -m langflow --help command and normalized step names. Changes applied in both the main and experimental test blocks; no other steps altered. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/cross-platform-test.yml (1)
256-266: Optional: single cross-platform step without duplication.If the goal is cross-platform consistency, compute the venv Python path once and reuse it. Example step to add after “Create fresh virtual environment”:
# bash if [[ "${{ matrix.os }}" == "windows" ]]; then echo "PY_EXEC=test-env\\Scripts\\python.exe" >> "$GITHUB_ENV" else echo "PY_EXEC=./test-env/bin/python" >> "$GITHUB_ENV" fiThen both help steps can be collapsed into one:
- name: Test CLI help command (All) run: | "$PY_EXEC" -m langflow --help shell: bashThis preserves correctness (executes the installed package) and removes the need for
uv runhere.Also applies to: 508-519
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/cross-platform-test.yml(2 hunks)
🔇 Additional comments (2)
.github/workflows/cross-platform-test.yml (2)
256-261: The above script will confirm where and howtest-envis created and used, and whetheruv runis indeed bypassing that venv on Windows. Once we have the output, we can verify the correctness of switching totest-env\Scripts\python.exeand finalize the review.
514-519: Verification in progress: examining venv setup anduv runusage…
| - name: Test CLI help command (Unix) | ||
| if: matrix.os != 'windows' | ||
| run: | | ||
| ./test-env/bin/python -m langflow --help | ||
| uv run python -m langflow --help | ||
| shell: bash | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Same issue on Unix: ensure we execute against ./test-env, not the project env.
uv run won’t use ./test-env here, so this step may not validate the installed wheel/PyPI package. Use the venv’s interpreter for correctness and parity with the server/import tests below.
- uv run python -m langflow --help
+ ./test-env/bin/python -m langflow --helpOptional: unify naming to “Test CLI help command (Unix)” for consistency with surrounding steps.
🏁 Script executed:
#!/bin/bash
# Find where the virtual environment is created
grep -n "venv" -n .github/workflows/cross-platform-test.yml || true
# Locate all references to test-env
grep -n "test-env" .github/workflows/cross-platform-test.yml || true
# Confirm where 'uv run' is used
grep -n "uv run" .github/workflows/cross-platform-test.yml || trueLength of output: 2973
Use the test-env interpreter for the CLI help step
The uv run python -m langflow --help invocation will not target the ./test-env virtual environment—it defaults to creating or using a .venv directory instead—so this step isn’t actually validating the installed wheel/PyPI package. To ensure parity with the later server/import tests, explicitly invoke the test-env interpreter:
• File .github/workflows/cross-platform-test.yml, lines 259–267 (Unix):
- uv run python -m langflow --help
+ ./test-env/bin/python -m langflow --help• File .github/workflows/cross-platform-test.yml, lines 511–519 (Windows):
- uv run python -m langflow --help
+ .\test-env\Scripts\python.exe -m langflow --helpReferences:
• uv’s venv command by default manages a .venv directory—custom paths (like test-env) aren’t auto-discovered by uv run (docs.astral.sh)
• uv run python … internally invokes the environment’s Python interpreter at .venv/bin/python (or Scripts/python.exe) (kdjingpai.com)
Optional: you may also rename the step to “Test CLI help command (Unix)” / “Test CLI help command (Windows)” for consistency with surrounding steps.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Test CLI help command (Unix) | |
| if: matrix.os != 'windows' | |
| run: | | |
| ./test-env/bin/python -m langflow --help | |
| uv run python -m langflow --help | |
| shell: bash | |
| - name: Test CLI help command (Unix) | |
| if: matrix.os != 'windows' | |
| run: | | |
| ./test-env/bin/python -m langflow --help | |
| shell: bash |
🤖 Prompt for AI Agents
.github/workflows/cross-platform-test.yml lines 262–267 (Unix) and 511–519
(Windows): the CLI help step currently runs "uv run python -m langflow --help"
which targets a .venv instead of the created ./test-env, so change the command
to invoke the test-env interpreter directly—on Unix use the
./test-env/bin/python -m langflow --help and on Windows use
.\test-env\Scripts\python.exe -m langflow --help; optionally rename the steps to
“Test CLI help command (Unix)” and “Test CLI help command (Windows)” for
consistency.
| - name: Test CLI help command (Windows) | ||
| if: matrix.os == 'windows' | ||
| run: | | ||
| test-env\Scripts\python.exe -m langflow --help | ||
| uv run python -m langflow --help | ||
| shell: cmd | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Experimental matrix: same uv run environment mismatch as above (Windows).
This will not run against test-env. Use the venv interpreter so we actually test the installed artifact.
- uv run python -m langflow --help
+ test-env\Scripts\python.exe -m langflow --help🏁 Script executed:
#!/bin/bash
workflow=".github/workflows/cross-platform-test.yml"
echo "=== Locating CLI help command ==="
rg -n -C3 "Test CLI help command" "$workflow"
echo "=== Locating venv creation steps ==="
rg -n -C3 "\bvenv\b" "$workflow"
echo "=== Locating uv run usage ==="
rg -n -C3 "uv run" "$workflow"
echo "=== Locating test-env references ==="
rg -n -C3 "test-env" "$workflow"Length of output: 11089
Use the venv Python interpreter for the Windows CLI-help test
The Windows “Test CLI help command” step is currently invoking the system Python via uv run, so it never actually exercises the installed wheel in our test-env venv. Update it to call the venv’s Python directly:
• File: .github/workflows/cross-platform-test.yml
• Lines: 508–513
- name: Test CLI help command (Windows)
if: matrix.os == 'windows'
- run: |
- uv run python -m langflow --help
+ run: |
+ .\test-env\Scripts\python.exe -m langflow --help
shell: cmd(Optional: apply the same pattern to the Unix variant at lines 514–518, replacing uv run python -m langflow --help with ./test-env/bin/python -m langflow --help.)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Test CLI help command (Windows) | |
| if: matrix.os == 'windows' | |
| run: | | |
| test-env\Scripts\python.exe -m langflow --help | |
| uv run python -m langflow --help | |
| shell: cmd | |
| - name: Test CLI help command (Windows) | |
| if: matrix.os == 'windows' | |
| run: | | |
| .\test-env\Scripts\python.exe -m langflow --help | |
| shell: cmd |
🤖 Prompt for AI Agents
In .github/workflows/cross-platform-test.yml around lines 508 to 513, the
Windows "Test CLI help command" step uses the system Python via `uv run python
-m langflow --help` which does not exercise the wheel installed in the test
virtualenv; change the command to invoke the venv's Python directly (e.g., use
the path to the Windows virtualenv python executable under the test-env folder)
so the installed package is executed from the venv; optionally apply the same
change to the Unix variant at lines 514–518 by replacing `uv run python -m
langflow --help` with the test-env's bin/python invocation.



Ensure all CLI help command tests use 'uv run' for consistency across Windows and Unix platforms.
Summary by CodeRabbit
Tests
Chores