Skip to content

ci: Update CLI help command tests for cross-platform consistency#9515

Merged
ogabrielluiz merged 2 commits into
mainfrom
improve-ci-test
Jan 21, 2026
Merged

ci: Update CLI help command tests for cross-platform consistency#9515
ogabrielluiz merged 2 commits into
mainfrom
improve-ci-test

Conversation

@ogabrielluiz
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz commented Aug 25, 2025

Ensure all CLI help command tests use 'uv run' for consistency across Windows and Unix platforms.

Summary by CodeRabbit

  • Tests

    • Standardized CLI help command checks across operating systems using a unified execution method, improving cross-platform consistency and reliability. Applied to both main and experimental test blocks.
  • Chores

    • Updated workflow step names for clarity and consistency in test reporting.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 25, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Replaced 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

Cohort / File(s) Summary of Changes
GitHub Actions workflow
.github/workflows/cross-platform-test.yml
Standardized CLI help command to uv run python -m langflow --help for all OSes; updated step names from “Test CLI help command (Windows)” to “Test CLI help command” in both main and experimental blocks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-ci-test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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"
fi

Then both help steps can be collapsed into one:

- name: Test CLI help command (All)
  run: |
    "$PY_EXEC" -m langflow --help
  shell: bash

This preserves correctness (executes the installed package) and removes the need for uv run here.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between d3abfb5 and 7cf59ff.

📒 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 how test-env is created and used, and whether uv run is indeed bypassing that venv on Windows. Once we have the output, we can verify the correctness of switching to test-env\Scripts\python.exe and finalize the review.


514-519: Verification in progress: examining venv setup and uv run usage…

Comment on lines 262 to 267
- 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

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.

💡 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 --help

Optional: 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 || true

Length 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 --help

References:
• 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.

Suggested change
- 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.

Comment on lines 508 to 513
- 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

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.

💡 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.

Suggested change
- 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.

Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

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

LGTM

@ogabrielluiz ogabrielluiz added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit 15ad6ac Jan 21, 2026
19 checks passed
@ogabrielluiz ogabrielluiz deleted the improve-ci-test branch January 21, 2026 22:15
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.

2 participants