Skip to content

fix(lfx): cap component loader concurrency#14003

Open
dexhunter wants to merge 1 commit into
langflow-ai:release-1.11.0from
dexhunter:agent/cap-component-loader-workers
Open

fix(lfx): cap component loader concurrency#14003
dexhunter wants to merge 1 commit into
langflow-ai:release-1.11.0from
dexhunter:agent/cap-component-loader-workers

Conversation

@dexhunter

@dexhunter dexhunter commented Jul 10, 2026

Copy link
Copy Markdown

Summary

  • add LANGFLOW_COMPONENT_LOAD_MAX_WORKERS to cap concurrent dynamic component imports
  • preserve the current asyncio.to_thread behavior when the variable is unset or invalid
  • warn on invalid or non-positive limits
  • retain prompt cancellation behavior by applying the cap with an asyncio.Semaphore
  • document the new environment variable alongside other component settings

Fixes #11354.

Validation

  • cd src/lfx && uv sync --group dev && uv run pytest tests/unit/test_component_index.py -q: 32 passed
  • uvx ruff format --check src/lfx/src/lfx/interface/components.py src/lfx/tests/unit/test_component_index.py
  • uvx ruff check --fix --select F401,F821,E9,B026 src/lfx/src/lfx/interface/components.py src/lfx/tests/unit/test_component_index.py
  • python -m py_compile src/lfx/src/lfx/interface/components.py src/lfx/tests/unit/test_component_index.py
  • git diff --check

The strict component-loader evaluation measured a peak of 32 concurrent imports before the change and 1 with LANGFLOW_COMPONENT_LOAD_MAX_WORKERS=1. Leaving the variable unset preserved the 32-worker default, and selective component loading remained correct.

Supplementary autoresearch: public dashboard.

Summary by CodeRabbit

  • New Features

    • Added an environment setting to limit concurrent component loading during startup.
    • Invalid or unsupported values now fall back safely with a warning.
    • Added documentation for controlling onboarding progress visibility in embedded mode.
  • Bug Fixes

    • Improved cancellation behavior while components are loading, allowing startup tasks to stop without blocking the application.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6dc60536-b9d4-4abb-a680-bc5904d49ecf

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added the bug Something isn't working label Jul 10, 2026
@dexhunter
dexhunter marked this pull request as ready for review July 10, 2026 11:11
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 10, 2026
@erichare
erichare deleted the branch langflow-ai:release-1.11.0 July 15, 2026 18:36
@erichare erichare closed this Jul 15, 2026
@erichare erichare reopened this Jul 15, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 15, 2026
@dexhunter
dexhunter force-pushed the agent/cap-component-loader-workers branch from 3119e28 to f889d50 Compare July 16, 2026 20:51
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants