Skip to content

refactor(urlcomponent): rename output display names and method references#8448

Merged
edwinjosechittilappilly merged 15 commits into
mainfrom
fix-url-component
Jun 11, 2025
Merged

refactor(urlcomponent): rename output display names and method references#8448
edwinjosechittilappilly merged 15 commits into
mainfrom
fix-url-component

Conversation

@edwinjosechittilappilly
Copy link
Copy Markdown
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly commented Jun 9, 2025

This pull request refactors the URLComponent class in src/backend/base/langflow/components/data/url.py to improve code readability, maintainability, and consistency. Key changes include reformatting multiline strings, updating method names for clarity, and restructuring dictionary comprehensions and list comprehensions for better readability.

Code readability improvements:

  • Reformatted multiline strings in info attributes of various input components (e.g., MessageTextInput, SliderInput, BoolInput, and DropdownInput) to improve readability. [1] [2] [3] [4] [5]
  • Updated dictionary and list comprehensions to span multiple lines for improved clarity (e.g., headers_dict in _create_loader and data in fetch_url_contents). [1] [2]

Method and attribute updates:

  • Renamed the as_message method to fetch_content_as_message to better reflect its purpose and align with naming conventions.
  • Updated the outputs attribute to use more descriptive display names and method references (e.g., "Extracted Pages" and "Raw Content").

Minor fixes:

  • Adjusted the autoset_encoding parameter in _create_loader to fix a formatting issue.
  • Improved logging and exception handling in fetch_url_contents for better debugging and error reporting. [1] [2]

Summary by CodeRabbit

  • Refactor
    • Updated output display names for improved clarity in the URL extraction component.
    • Renamed output methods for consistency in the user interface.
  • Style
    • Reformatted patterns and strings for better readability in component configurations.
  • Chores
    • Increased maximum test shard count to improve test distribution efficiency.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 9, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 9, 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

The changes update the `URLComponent` by renaming its output display names and associated method references for clarity and consistency. The method `as_message` is renamed to `fetch_content_as_message`, and output labels are updated in both the Python implementation and the corresponding starter project JSON. Additionally, the maximum shard count for test distribution in the CI workflow was increased from 10 to 40. No core logic or control flow is altered.

## Changes

| File(s)                                                                                       | Change Summary                                                                                              |
|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| src/backend/base/langflow/components/data/url.py                                             | Reformatted URL regex for readability; renamed `as_message` to `fetch_content_as_message`; updated output display names and method references in `outputs`. |
| src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json                    | Updated `URLComponent` outputs: changed display names and method references to match Python implementation; reformatted regex string for readability.          |
| .github/workflows/typescript_test.yml                                                        | Increased maximum shard count for test distribution from 10 to 40 in the "Calculate Test Shards Distribution" step.                                           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant URLComponent

    User->>URLComponent: Request "Extracted Pages"
    URLComponent->>URLComponent: fetch_content()
    URLComponent-->>User: List of extracted pages

    User->>URLComponent: Request "Raw Content"
    URLComponent->>URLComponent: fetch_content_as_message()
    URLComponent-->>User: Message object with joined content

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABp7bAFmdRp6OUhsREpIOgB3eAwhfCSGBFxxLzRubngfeUx6DEcBSjpIAA4AFkb68IAzfAZE6X4sfza0MXwKDKJIXFgSSAADAFUbABkAYRZufHIMXGnGQsRkL07qOoyZxAoGAHoBQYBrMlortCSLwowiNoPUi6ZmNY3cRAXWjUNAXbAULwabiybYEFIYWCYBhTJhKPwkNDAtRedSycLMbSbQkqUq48IVBQYRBIGgYBiyDRGADSJHk8F+FHwUjYm2QGQYXmwSg4RigACoxSs0f5MSScbhZBwJZAALLeAoZKaIXAjN58rATKbTDIdbbUHXwAR4Hr4Nq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LaCQIYAsPwLaDd3wIYEaDQAzwzwEASOEOYJ/1UPcP/wgyAKvFANrjoHulXH0CAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=langflow-ai/langflow&utm_content=8448):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in 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.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Refactors the URLComponent class for improved readability, maintainability, and consistency in its string formatting, method naming, and comprehensions.

  • Reformats multiline strings and comprehensions for clarity
  • Renames as_message to fetch_content_as_message and updates outputs
  • Fixes formatting of autoset_encoding and enhances exception logging
Comments suppressed due to low confidence (3)

src/backend/base/langflow/components/data/url.py:176

  • [nitpick] The display name includes an unintended trailing space. Remove the extra space: "Extracted Pages".
Output(display_name="Extracted Pages ",

src/backend/base/langflow/components/data/url.py:303

  • Accessing e.message is deprecated in many Python versions. Use str(e) directly: error_msg = str(e).
error_msg = e.message if hasattr(e, "message") else e

src/backend/base/langflow/components/data/url.py:245

  • The split assignment autoset_encoding=self.\nautoset_encoding, breaks attribute access and causes a syntax error. Combine into autoset_encoding=self.autoset_encoding, on one line.
autoset_encoding=self.

Comment on lines +294 to +301
data = [{
"text": safe_convert(doc.page_content, clean_data=True),
"url": doc.metadata.get("source", ""),
"title": doc.metadata.get("title", ""),
"description": doc.metadata.get("description", ""),
"content_type": doc.metadata.get("content_type", ""),
"language": doc.metadata.get("language", ""),
} for doc in all_docs]
Copy link

Copilot AI Jun 9, 2025

Choose a reason for hiding this comment

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

[nitpick] The data comprehension is formatted as a single line, which contrasts with the expanded comprehensions above. Consider expanding it over multiple lines for consistency and readability.

Copilot uses AI. Check for mistakes.
coderabbitai Bot added a commit that referenced this pull request Jun 9, 2025
Docstrings generation was requested by @edwinjosechittilappilly.

* #8448 (comment)

The following files were modified:

* `src/backend/base/langflow/components/data/url.py`
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 9, 2025

Note

Generated docstrings for this pull request at #8449

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 9, 2025
@coderabbitai coderabbitai Bot changed the title @coderabbit refactor(urlcomponent): rename output display names and method references Jun 9, 2025
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

🧹 Nitpick comments (2)
src/backend/base/langflow/components/data/url.py (1)

172-172: Fix trailing space in display name.

The display name "Extracted Pages " contains a trailing space which appears to be unintentional.

-        Output(display_name="Extracted Pages ", name="page_results", method="fetch_content"),
+        Output(display_name="Extracted Pages", name="page_results", method="fetch_content"),
src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (1)

1366-1366: Fix trailing space in display name (consistent with Python file).

The display name "Extracted Pages " contains the same trailing space issue as found in the Python file.

-                "display_name": "Extracted Pages ",
+                "display_name": "Extracted Pages",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40b48ee and 7c3ed54.

📒 Files selected for processing (2)
  • src/backend/base/langflow/components/data/url.py (3 hunks)
  • src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (3 hunks)
🔇 Additional comments (5)
src/backend/base/langflow/components/data/url.py (3)

21-26: LGTM: URL regex formatting improved for readability.

The multiline formatting of the URL regex pattern enhances code readability without affecting functionality.


173-173: LGTM: Output naming and method reference improved.

The display name "Raw Content" is clearer than the previous "Raw Result", and the method reference correctly points to the renamed method.


300-300: LGTM: Method renamed for better clarity.

The new method name fetch_content_as_message is more descriptive and aligns well with naming conventions, clearly indicating both the action (fetch content) and the return type (as message).

src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (2)

1380-1382: LGTM: Consistent updates with Python implementation.

The display name change to "Raw Content" and method reference update to "fetch_content_as_message" correctly mirror the changes made in the Python URLComponent file, maintaining consistency between the implementation and starter project configuration.


1448-1448: LGTM: Embedded code string reflects the refactored URLComponent.

The embedded URLComponent code string has been updated to include the same formatting improvements and method renaming as the main Python implementation, ensuring consistency across the codebase.

@github-actions github-actions Bot added the refactor Maintenance tasks and housekeeping label Jun 9, 2025
@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 9, 2025
@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 9, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 10, 2025
@github-actions github-actions Bot removed the refactor Maintenance tasks and housekeeping label Jun 10, 2025
@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 10, 2025
@edwinjosechittilappilly
Copy link
Copy Markdown
Collaborator Author

@CodeRabbit can you find which all frontend tests are failing and potential ways to fix it?

@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 11, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 11, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Repository and PR details
REPO="langflow-ai/langflow"
PR_NUMBER=8448

echo "Fetching head branch for PR #$PR_NUMBER…" >&2
HEAD_REF=$(gh pr view "$PR_NUMBER" -R "$REPO" --json headRefName -q .headRefName)
echo "Head branch: $HEAD_REF" >&2
echo

echo "Listing failing / incomplete workflow runs for branch $HEAD_REF…" >&2
# Get the latest 100 workflow runs for this branch
gh api -X GET "repos/$REPO/actions/runs?branch=$HEAD_REF&per_page=100" \
  | jq -r '.workflow_runs[]
           | select(.conclusion=="failure" or .conclusion==null)
           | "\(.id) \(.name) \(.status) \(.conclusion)"' > /tmp/runs.txt

cat /tmp/runs.txt >&2
echo

# Iterate over each run ID and fetch logs to detect failing frontend tests
while read -r RUN_ID RUN_NAME RUN_STATUS RUN_CONCLUSION; do
  echo "Downloading logs for run $RUN_ID ($RUN_NAME) …" >&2
  gh run view "$RUN_ID" -R "$REPO" --log > "/tmp/run_${RUN_ID}.log" || {
    echo "Could not fetch logs for run $RUN_ID" >&2
    continue
  }
  echo "Extracting failing Jest/Vitest test suites or test cases…" >&2
  # Grep common FAIL markers (Jest, Vitest, Playwright etc.)
  grep -nE 'FAIL|● .*' "/tmp/run_${RUN_ID}.log" | head -50 || {
    echo "No explicit FAIL markers found in the first 50 matches." >&2
  }
  echo
done < /tmp/runs.txt

Length of output: 12047


🏁 Script executed:

#!/bin/bash
set -euo pipefail

LOG="/tmp/run_15576686250.log"

if [[ ! -f "$LOG" ]]; then
  echo "Log $LOG not found in sandbox; please re-download if needed." >&2
  exit 1
fi

echo "=== Checking failing indicators in $LOG ===" >&2
grep -nE 'Test Suites: [0-9]+ failed|FAIL +src|● .*' -A2 -B2 "$LOG" | head -60 || echo "No matches for Test Suites/FAIL pattern." >&2

echo
echo "=== Checking Vitest/Jest summary lines ===" >&2
grep -nE 'Tests: +[0-9]+ failed|Failed Tests:' -A2 -B2 "$LOG" | head -60 || echo "No summary failure lines found." >&2

echo
echo "=== Checking npm/pnpm script test step exit ===" >&2
grep -nE 'npm ERR!|pnpm ERR!' -A2 -B2 "$LOG" | head -40 || echo "No npm/pnpm ERR detected." >&2

Length of output: 934


🏁 Script executed:

#!/bin/bash
set -euo pipefail

LOG="/tmp/run_15576686250.log"
if [[ ! -f "$LOG" ]]; then
  echo "Need to (re-)download the CI log first." >&2
  exit 1
fi

echo "=== Search for common test runners in CI log ===" >&2
grep -nE 'vitest|jest|playwright|cypress|react-scripts test|pnpm test|npm run test|yarn test' "$LOG" | head -20

echo
echo "=== Search for lines mentioning \"frontend\" or \"ui\" failures ===" >&2
grep -niE 'frontend|ui|browser' "$LOG" | head -20

Length of output: 327


🏁 Script executed:

#!/bin/bash
set -euo pipefail

REPO="langflow-ai/langflow"
RUN_ID=15576686250

echo "Fetching job matrix for CI run $RUN_ID…" >&2
gh run view "$RUN_ID" -R "$REPO" --json jobs -q '.jobs[] | [.name, .conclusion] | @tsv' \
  | column -t

Length of output: 379


🏁 Script executed:

#!/bin/bash
set -euo pipefail

LOG="/tmp/run_15576686250.log"
if [[ ! -f "$LOG" ]]; then
  echo "❌  CI log not present in sandbox. It may have been cleared. Re-download it first with:"
  echo "    gh run view 15576686250 -R langflow-ai/langflow --log > /tmp/run_15576686250.log"
  exit 1
fi

echo "=== Quick scan for common test-failure patterns in CI log ===" >&2
grep -nE 'FAILURES|FAILED|ERROR|✖|×|AssertionError|expect\(.*\).*\s+to\s' "$LOG" | head -40 || {
  echo "No obvious failure markers found in first scan." >&2
}

echo
echo "=== Show end-of-file (last 300 lines) to inspect exit reason ===" >&2
tail -300 "$LOG"

Length of output: 24937


@edwinjosechittilappilly

I inspected the latest failing CI run for this PR (run 15576686250).
Key findings:

  1. The “test-frontend” job never executed – its status is skipped (same for “test-backend”, “lint-backend”, etc.).
    The summary printed by the CI Success job shows:
{
  "test-frontend": { "result": "skipped" },
  …
  "set-ci-condition": { "result": "success",
                        "outputs": { "should-run-ci": "false",
                                     "should-run-tests": "true" } }
}
  1. Because should-run-ci is false, the helper script inside the CI Success job exits with EXIT_CODE=1, which makes the whole workflow conclude as failure even though no tests actually ran.

So at the moment there are no failing frontend tests – the workflow is failing on logic that decides “nothing to test” but still returns a non-zero exit code.

Potential fixes

  1. Workflow exit‐code logic
    • In .github/workflows/ci.yml (or the composite action used), change the “CI Success” step to exit 0 when every real test job is skipped.
    • Alternatively, guard the job with if: always() && failure() logic so that it only fails when a real job fails.

  2. Path / label conditions
    • The “test-frontend” job is probably gated by a path-filter (frontend/**, src/frontend/**, etc.).
    • Because this PR only touches backend/python files and a workflow file, the matcher says “no frontend changes” ⇒ job skipped.
    • If you still want the frontend tests to run on every PR, remove the path-filter (or add fallback if: ${{ github.event.pull_request }}).

  3. Quick sanity run
    • You can trigger the “TypeScript Tests” workflow manually from Actions → “typescript_test” → “Run workflow” on this branch to verify the actual Jest/Vitest status.

Unless you enable the frontend test job, there will be nothing to debug or fix in the test suite itself. The CI breakage is purely workflow logic.

Let me know if you’d like a patch proposal for the workflow condition. 🐇

@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 11, 2025
@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 11, 2025
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jun 11, 2025
@github-actions github-actions Bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Jun 11, 2025
@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Jun 11, 2025
Merged via the queue into main with commit 1dbc8d9 Jun 11, 2025
63 of 66 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-url-component branch June 11, 2025 20:08
ogabrielluiz pushed a commit to bkatya2001/langflow that referenced this pull request Jun 24, 2025
…nces (langflow-ai#8448)

* Update url.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* template updates

* [autofix.ci] apply automated fixes

* increase shards for testing

* update name

* fix-frontend-tests-url-component

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE Don't Merge this PR lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants