Skip to content

chore: simplfied cross-platform test logic#9256

Merged
epinzur merged 1 commit into
mainfrom
cp_fix5
Jul 31, 2025
Merged

chore: simplfied cross-platform test logic#9256
epinzur merged 1 commit into
mainfrom
cp_fix5

Conversation

@epinzur
Copy link
Copy Markdown
Contributor

@epinzur epinzur commented Jul 31, 2025

Summary by CodeRabbit

  • Chores
    • Unified manual and programmatic cross-platform testing workflows into a single, streamlined workflow.
    • Enhanced the workflow to support flexible installation testing (PyPI or source wheels), multi-platform matrix testing, and improved reporting.
    • Removed legacy workflow files and updated documentation to reflect the new unified workflow and usage instructions.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 31, 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

This change deletes the old manual and shared cross-platform test workflows, introduces a unified and expanded cross-platform test workflow (cross-platform-test.yml) that supports both manual and programmatic triggers, and updates documentation to reflect the new unified workflow and its usage.

Changes

Cohort / File(s) Change Summary
Delete Old Manual Workflow
.github/workflows/cross-platform-test-manual.yml
Removed the manual cross-platform test workflow, including its jobs and input parameters for PyPI/source install, version, and timeout.
Delete Shared Reusable Workflow
.github/workflows/cross-platform-test-shared.yml
Removed the reusable shared cross-platform test workflow, which previously handled OS/arch/Python matrix testing for both wheel and PyPI installs.
Documentation Update for Unified Workflow
.github/workflows/cross-platform-test.md
Updated documentation to describe the new unified workflow, revised usage instructions for both manual and programmatic triggers, and detailed the new architecture and parameterization.
Unified and Expanded Workflow
.github/workflows/cross-platform-test.yml
Added a new workflow supporting both workflow_dispatch and workflow_call triggers, matrix test jobs across OS/arch/Python, dynamic install method selection, improved artifact handling, and enhanced summary reporting. Refined job dependencies and parameter handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub Actions
    participant Build Job
    participant Test Matrix Job
    participant Test Summary Job

    User->>GitHub Actions: Trigger workflow (manual or programmatic)
    alt Manual trigger
        GitHub Actions->>Build Job: (if source install required)
    else Programmatic trigger
        GitHub Actions->>Build Job: (if source install required)
    end
    GitHub Actions->>Test Matrix Job: Start test jobs (matrix over OS/arch/Python)
    Test Matrix Job->>GitHub Actions: Report results
    GitHub Actions->>Test Summary Job: Run summary (depends on test jobs)
    Test Summary Job->>User: Output test results
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested labels

documentation, size:L, lgtm

Suggested reviewers

  • ogabrielluiz
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cp_fix5

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@SonicDMG SonicDMG temporarily deployed to cp_fix5 - langflow-manual-install PR #9256 July 31, 2025 11:22 — with Render Destroyed
@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: 0

🔭 Outside diff range comments (1)
.github/workflows/cross-platform-test.yml (1)

78-97: Base artifact may contain both wheels – build order/upload sequence.

adhoc-dist-base is uploaded after the main package is built, so the dist directory already contains both wheels.
This defeats the purpose of having a dedicated “base” artifact and later find … | head -1 could yield the wrong file.

-  - name: Build base package
-    run: make build_langflow_base args="--wheel"
-  - name: Build main package
-    run: make build_langflow args="--wheel"
-  - name: Upload base artifact
+  - name: Build base package
+    run: make build_langflow_base args="--wheel"
+  - name: Upload base artifact           # upload immediately while dist is clean
     uses: actions/upload-artifact@v4
     with:
       name: adhoc-dist-base
       path: /home/runner/work/langflow/langflow/dist
+
+  - name: Clean dist for main package    # avoid cross-contamination
+    run: rm -rf dist && mkdir dist
+
+  - name: Build main package
+    run: make build_langflow args="--wheel"
+  - name: Upload main artifact
🧹 Nitpick comments (3)
.github/workflows/cross-platform-test.md (2)

3-4: Consistently capitalize “Langflow”.

Company-wide docs guidance (see retrieved learnings) states we always capitalize “Langflow”. Please update the lower-case occurrences in these lines and elsewhere in the file for consistency and searchability.

Also applies to: 67-72


112-122: Add a language tag to the fenced block (MD040).

markdownlint flags this block because it lacks a language spec.
text works well for directory trees:

-```
+```text
 cross-platform-test.yml
 ├── workflow_dispatch (Manual UI)
 ...
-```
+```
.github/workflows/cross-platform-test.yml (1)

357-368: Multiline Python -c block is fragile on Windows cmd.

cmd treats the line breaks inside the double-quoted string unpredictably; the embedded newlines may truncate the command.

Safer one-liner:

-test-env\Scripts\python.exe -c "
-try:
-    import langflow
-    ...
-"
+test-env\Scripts\python.exe - <<'PY'
+import sys, importlib
+import langflow
+print("✅ langflow import successful on %s" % sys.platform)
+PY
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25f1107 and 793d310.

📒 Files selected for processing (4)
  • .github/workflows/cross-platform-test-manual.yml (0 hunks)
  • .github/workflows/cross-platform-test-shared.yml (0 hunks)
  • .github/workflows/cross-platform-test.md (4 hunks)
  • .github/workflows/cross-platform-test.yml (2 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/cross-platform-test-manual.yml
  • .github/workflows/cross-platform-test-shared.yml
🧰 Additional context used
🧠 Learnings (2)
.github/workflows/cross-platform-test.md (5)

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-07-18T18:26:42.027Z
Learning: Applies to docs/docs/**/*.{md,mdx} : Use consistent terminology: always capitalize Langflow, Component, Flow, and uppercase API and JSON.

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-21T14:16:14.125Z
Learning: Applies to src/backend/tests/**/*.py : Test flows using predefined JSON data and utility functions such as 'create_flow', 'build_flow', 'get_build_events', and 'consume_and_assert_stream' in backend Python tests.

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-07-18T18:25:54.487Z
Learning: Applies to src/backend/tests/unit/**/*.py : Test component integration within flows using create_flow, build_flow, and get_build_events utilities

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-21T14:16:14.125Z
Learning: Applies to src/backend/tests/**/*.py : Test Langflow's REST API endpoints in backend Python tests using the async client fixture and asserting response codes and payloads.

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-21T14:16:14.125Z
Learning: Applies to src/backend/tests/**/*.py : Test timeout and performance constraints in backend Python tests using 'asyncio.wait_for' and timing assertions.

.github/workflows/cross-platform-test.yml (2)

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-07-18T18:25:54.487Z
Learning: Applies to src/backend/tests/unit/**/*.py : Test component integration within flows using create_flow, build_flow, and get_build_events utilities

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-21T14:16:14.125Z
Learning: Applies to src/backend/tests/**/*.py : Test flows using predefined JSON data and utility functions such as 'create_flow', 'build_flow', 'get_build_events', and 'consume_and_assert_stream' in backend Python tests.

🪛 markdownlint-cli2 (0.17.2)
.github/workflows/cross-platform-test.md

114-114: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (1)
.github/workflows/cross-platform-test.yml (1)

160-164: Verify actions/setup-python ARM64 support.

architecture: arm64 is passed for macOS runners. Native arm64 support only landed recently and may still be in preview. If the runner image lacks the requested architecture you’ll get a “version not found” error.

Run the workflow once on macos-latest/arm64 to confirm 3.13 downloads successfully; fall back to Rosetta (x64) if it fails.

@epinzur epinzur merged commit 0c129be into main Jul 31, 2025
15 of 16 checks passed
@epinzur epinzur deleted the cp_fix5 branch July 31, 2025 11:25
@ogabrielluiz ogabrielluiz changed the title bug: simplfied cross-platform test logic chore: simplfied cross-platform test logic Jul 31, 2025
2getsandesh pushed a commit to 2getsandesh/langflow-IBM that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants