Skip to content

feat: make langflow-core the shared bundle-free distribution#14100

Open
erichare wants to merge 28 commits into
release-1.11.0from
fix/langflow-core-distribution-1.11
Open

feat: make langflow-core the shared bundle-free distribution#14100
erichare wants to merge 28 commits into
release-1.11.0from
fix/langflow-core-distribution-1.11

Conversation

@erichare

@erichare erichare commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Rework the package boundary so langflow-core is the shared, usable, bundle-free Langflow distribution rather than a sibling wrapper around langflow-base.

  • keep langflow-base as the modular infrastructure package; its bare install stays intentionally minimal
  • make langflow-core depend on langflow-base[complete], own both the langflow and langflow-core CLIs, and expose the matching audio and postgresql extras
  • make the full langflow package depend on langflow-core plus the curated provider bundles
  • keep provider integrations out of core and preserve the existing no-torch default for the full distribution
  • update package docs and core-only version reporting to reflect the new hierarchy

Release and image topology

  • publish in dependency order: SDK → LFX → base → core → full
  • allow full-only and core-only patch releases to reuse compatible packages from the same minor line
  • publish coordinated nightlies with exact full → core → base development pins
  • handle newly versioned bundle release candidates when building a full prerelease
  • build core and full from one multi-target Dockerfile, with full remaining the default target
  • apply the same non-root runtime and SSRF hardening to both public images

Existing pip install langflow and full-image users keep the full distribution. pip install langflow-core and langflowai/langflow:core-* provide the service-complete instance without provider bundles.

Validation

  • 45 focused stable/nightly release and Docker contract tests
  • 34 package-layering, version-patching, and core-version tests
  • rebuilt and inspected both wheels: core owns the CLIs and depends on base; full depends on core plus bundles and has no duplicate console entry point
  • real Podman full RC image build and runtime smoke test verified matching full/core versions and LANGFLOW_CONNECTOR_SSRF_ALLOW_LOOPBACK=false
  • actionlint, uv lock --check, Ruff, git diff --check, and the repository pre-commit suite

Targeting note

This is temporarily based on release-1.11.0 because that release line has not yet been merged forward to main; the intended landing target is 1.12. Retarget it to main after the 1.11 forward merge.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: f5dbf89c-9474-4803-8e87-aedac6152021

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

Walkthrough

This pull request adds the langflow-core distribution, including package metadata, build and publish tooling, bundle-free Docker images, CI validation, release automation, documentation, and version detection support.

Changes

Langflow Core distribution

Layer / File(s) Summary
Core package contract and tooling
pyproject.toml, src/langflow-core/*, Makefile, README.md, docs/docs/..., src/lfx/tests/...
Adds the workspace package, dependency metadata, console scripts, Makefile build/publish/version-patching targets, installation documentation, and contract tests.
Core Docker image
docker/build_and_push_core.Dockerfile, docker/build_and_push*.Dockerfile
Builds SDK, LFX, base, and core wheels into a bundle-free runtime image and adds core workspace metadata to existing Docker build contexts.
Core package and Docker release pipeline
.github/workflows/release.yml, .github/workflows/docker-build-v2.yml, .github/changes-filter.yaml, .secrets.baseline
Adds core release inputs, version calculation, wheel publishing, Docker image builds and manifests, release artifacts, path filters, and updated secret-baseline metadata.
Core artifact and image validation
.github/workflows/cross-platform-test.yml, .github/workflows/docker_test.yml
Builds and installs core wheels in CI, validates core-only imports and CLI startup, and tests the core Docker image version, distributions, health endpoint, and cleanup flow.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant BuildCore
  participant PublishCore
  participant DockerBuild
  ReleaseWorkflow->>BuildCore: determine version and build core wheel
  BuildCore->>PublishCore: upload dist-core artifact
  PublishCore->>ReleaseWorkflow: publish langflow-core
  ReleaseWorkflow->>DockerBuild: dispatch core image build
Loading

Possibly related PRs

Suggested labels: lgtm

Suggested reviewers: jordanrfrazier

🚥 Pre-merge checks | ✅ 4 | ❌ 5

❌ Failed checks (1 warning, 4 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Coverage For New Implementations ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Quality And Coverage ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test File Naming And Structure ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Excessive Mock Usage Warning ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: introducing langflow-core as the shared bundle-free distribution.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/langflow-core-distribution-1.11

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 enhancement New feature or request label Jul 15, 2026
…w-core-distribution-1.11

# Conflicts:
#	.github/workflows/cross-platform-test.yml
#	.github/workflows/release.yml
#	.secrets.baseline
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 15, 2026
@github-actions

This comment has been minimized.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.05%. Comparing base (e58738e) to head (6ed0f44).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.11.0   #14100      +/-   ##
==================================================
- Coverage           61.13%   61.05%   -0.09%     
==================================================
  Files                2427     2384      -43     
  Lines              238928   236870    -2058     
  Branches            37114    35445    -1669     
==================================================
- Hits               146066   144617    -1449     
+ Misses              91108    90498     -610     
- Partials             1754     1755       +1     
Flag Coverage Δ
backend 68.69% <ø> (+0.81%) ⬆️
frontend 59.29% <ø> (-0.37%) ⬇️
lfx 59.78% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/backend/base/langflow/utils/version.py 97.77% <ø> (ø)
src/lfx/src/lfx/cli/validation/core.py 89.62% <100.00%> (ø)

... and 343 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 15, 2026

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/docker-build-v2.yml (1)

10-42: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Validate reusable-workflow inputs before shell expansion.

workflow_call.release_type is unconstrained, while version_override and release_type are inserted directly into Bash. A caller can inject shell syntax. Pass inputs through env and validate the release type allowlist and Docker-safe version before use.

Based on learnings, workflow_call string inputs require runtime validation; descriptions and dispatch choices do not constrain reusable-workflow callers.

Also applies to: 147-150, 758-759

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/docker-build-v2.yml around lines 10 - 42, Harden the
workflow inputs used by the release script: in the relevant shell step(s), pass
workflow_call values such as release_type and version_override through the step
environment rather than interpolating them directly into Bash, then validate
release_type against the documented allowlist and version_override against a
Docker-safe version pattern before use. Apply the same protection to the
referenced input usages near the workflow dispatch and later shell sections,
preserving the existing release behavior for valid values.

Sources: Learnings, Linters/SAST tools

🧹 Nitpick comments (2)
src/lfx/tests/unit/test_langflow_core_distribution.py (1)

66-69: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Rename test to accurately reflect its assertion.

The test name implies it is inspecting the contents of a built wheel, but it actually asserts the presence of the __init__.py marker file in the source tree. Consider renaming it for clarity.

♻️ Proposed fix
- def test_langflow_core_wheel_contains_a_nonempty_marker_package():
+ def test_langflow_core_source_contains_a_nonempty_marker_package():
      marker = CORE_ROOT / "src" / "langflow_core" / "__init__.py"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lfx/tests/unit/test_langflow_core_distribution.py` around lines 66 - 69,
Rename test_langflow_core_wheel_contains_a_nonempty_marker_package to describe
that it verifies a non-empty source-tree __init__.py marker, without changing
the assertion or test behavior.
docker/build_and_push_core.Dockerfile (1)

98-101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin NODE_VERSION for reproducibility and alignment.

This Dockerfile dynamically fetches the latest Node 22.x version during the build. This can lead to non-repeatable builds and unexpected failures if the remote index format changes. Furthermore, the main build_and_push.Dockerfile hardcodes NODE_VERSION="22.14.0". Pinning the version here aligns the core image with the main image build constraints.

♻️ Proposed fix
-    && NODE_VERSION=$(curl -fsSL https://nodejs.org/dist/latest-v22.x/ \
-                    | sed -nE "s/.*node-v([0-9]+\.[0-9]+\.[0-9]+)-linux-${NODE_ARCH}\.tar\.xz.*/\1/p" \
-                    | head -1) \
-    && if [ -z "$NODE_VERSION" ]; then echo "ERROR: Could not determine Node.js version" && exit 1; fi \
+    && NODE_VERSION="22.14.0" \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker/build_and_push_core.Dockerfile` around lines 98 - 101, Replace the
dynamic NODE_VERSION lookup from the latest Node.js 22.x index with the pinned
value 22.14.0, matching the NODE_VERSION setting used by the main build
Dockerfile; remove the associated curl, sed, validation, and failure logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cross-platform-test.yml:
- Line 1100: Update the conditional in the cross-platform workflow to consume
langflow-version from an environment variable rather than interpolating the
input directly into Bash source; define or pass the environment value through
the workflow step and compare that variable while preserving the existing
empty-value and core_result checks.

In @.github/workflows/docker-build-v2.yml:
- Around line 151-170: Update the Docker Hub tag lookup logic in the
release-version calculation branches to fail closed: enable pipeline/status
checking, fetch the response with retries while requiring HTTP 200, store it in
a temporary file, and validate/parse that file as JSON before deriving tag
lists. Ensure any network, HTTP, or JSON failure exits the workflow instead of
treating the lookup as empty, preserving the existing release-skip comparison.
- Around line 330-341: Guard both registry login steps, “Login to Docker Hub”
and “Login to GitHub Container Registry,” with the existing push_to_registry
condition so authentication runs only for builds that publish images. Ensure
no-push builds neither access registry secrets nor require them.

In @.github/workflows/release.yml:
- Around line 178-182: Update the release validation around the
release_package_core/release_package_base check to allow core-only publication
when a compatible Langflow Base release is already available on PyPI or has been
selected for the current run. Reuse the existing base-resolution logic from the
release flow and the publish-base skip handling near the referenced sections;
reject only when neither condition is satisfied.

In `@docker/build_and_push_core.Dockerfile`:
- Around line 45-47: Replace npm install with npm ci in the Docker build RUN
command, preserving the existing PUPPETEER_SKIP_DOWNLOAD setting, cache mount,
and subsequent build command so dependencies are installed strictly from the
lockfile.

In `@docs/docs/Get-Started/get-started-installation.mdx`:
- Around line 188-200: Capitalize direct references to Langflow Components
consistently: in docs/docs/Get-Started/get-started-installation.mdx lines
188-200, update the heading and body references from “components”/“component” to
“Components”/“Component”; in docs/docs/Deployment/deployment-docker.mdx lines
33-38, change “core components” to “core Components”; and in
docs/docs/Develop/install-custom-dependencies.mdx lines 8-11 and 32-33, change
“component catalog” to “Component catalog” and “core components” to “core
Components.”

---

Outside diff comments:
In @.github/workflows/docker-build-v2.yml:
- Around line 10-42: Harden the workflow inputs used by the release script: in
the relevant shell step(s), pass workflow_call values such as release_type and
version_override through the step environment rather than interpolating them
directly into Bash, then validate release_type against the documented allowlist
and version_override against a Docker-safe version pattern before use. Apply the
same protection to the referenced input usages near the workflow dispatch and
later shell sections, preserving the existing release behavior for valid values.

---

Nitpick comments:
In `@docker/build_and_push_core.Dockerfile`:
- Around line 98-101: Replace the dynamic NODE_VERSION lookup from the latest
Node.js 22.x index with the pinned value 22.14.0, matching the NODE_VERSION
setting used by the main build Dockerfile; remove the associated curl, sed,
validation, and failure logic.

In `@src/lfx/tests/unit/test_langflow_core_distribution.py`:
- Around line 66-69: Rename
test_langflow_core_wheel_contains_a_nonempty_marker_package to describe that it
verifies a non-empty source-tree __init__.py marker, without changing the
assertion or test behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d87727df-a2b8-4f4f-8003-b140fd87c352

📥 Commits

Reviewing files that changed from the base of the PR and between 2af861f and 1318adb.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • .github/changes-filter.yaml
  • .github/workflows/cross-platform-test.yml
  • .github/workflows/docker-build-v2.yml
  • .github/workflows/docker_test.yml
  • .github/workflows/release.yml
  • .secrets.baseline
  • Makefile
  • README.md
  • docker/build_and_push.Dockerfile
  • docker/build_and_push_base.Dockerfile
  • docker/build_and_push_core.Dockerfile
  • docker/build_and_push_ep.Dockerfile
  • docker/build_and_push_with_extras.Dockerfile
  • docs/docs/Components/components-bundles.mdx
  • docs/docs/Deployment/deployment-docker.mdx
  • docs/docs/Develop/install-custom-dependencies.mdx
  • docs/docs/Get-Started/get-started-installation.mdx
  • pyproject.toml
  • src/backend/base/langflow/utils/version.py
  • src/backend/tests/unit/utils/test_version.py
  • src/langflow-core/README.md
  • src/langflow-core/pyproject.toml
  • src/langflow-core/src/langflow_core/__init__.py
  • src/lfx/tests/unit/test_langflow_core_distribution.py
  • src/lfx/tests/unit/test_patch_regexes.py

Comment thread .github/workflows/cross-platform-test.yml Outdated
Comment thread .github/workflows/docker-build-v2.yml Outdated
Comment thread .github/workflows/docker-build-v2.yml
Comment thread .github/workflows/release.yml Outdated
Comment thread docker/build_and_push_core.Dockerfile Outdated
Comment thread docs/docs/Get-Started/get-started-installation.mdx Outdated
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 46%
46.75% (66418/142061) 70.08% (9285/13249) 45.14% (1521/3369)

Unit Test Results

Tests Skipped Failures Errors Time
5328 0 💤 0 ❌ 0 🔥 21m 9s ⏱️

@erichare

Copy link
Copy Markdown
Collaborator Author

Addressed the review-body items in 28e6c542d4:

  • Added the reusable-workflow allowlist and Docker-safe version validation, with shell inputs passed through env.
  • Renamed the source-marker test to match what it asserts.
  • Kept runtime Node on the shared latest-v22.x policy: every sibling runtime image uses it, while 22.14.0 is already stale. A reproducibility change should pin and checksum all runtime images together.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 15, 2026
@github-actions

This comment has been minimized.

@erichare
erichare requested review from Adam-Aghili and mendonk July 15, 2026 23:13
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 16, 2026
@erichare
erichare marked this pull request as ready for review July 16, 2026 17:40
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 16, 2026
erichare added 2 commits July 16, 2026 10:46
…-1.11' into fix/langflow-core-distribution-1.11

# Conflicts:
#	docs/docs/Deployment/deployment-docker-core.mdx
#	docs/docs/Deployment/deployment-docker.mdx
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 16, 2026
@langflow-ai langflow-ai deleted a comment from github-actions Bot Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 16, 2026

@Adam-Aghili Adam-Aghili left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks okay but I would want to see a release dry-run from this PR before I am comfortable with it being merged. Then once merged attempting to create an RC to see what happens

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants