Skip to content

ci: add core/full release inventory gates - #14203

Merged
erichare merged 3 commits into
release-1.12.0from
fix/le-1873-inventory-release-gates
Jul 22, 2026
Merged

ci: add core/full release inventory gates#14203
erichare merged 3 commits into
release-1.12.0from
fix/le-1873-inventory-release-gates

Conversation

@erichare

@erichare erichare commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

  • add a checked-in release inventory contract and validator for the core, default, and full Python/image tiers
  • validate exact managed distributions, extension entry points, long-tail bundle folders, representative starter assets, compatibility shims, and actionable missing-bundle errors
  • add a reusable pre-publication matrix for Python 3.10–3.14 and amd64/arm64 core/default/full images, including startup/health and downstream core-image extension checks
  • block core/main package and image publication on inventory drift while preserving partial base, SDK, LFX, and bundle releases
  • expose langflow[bundles] as the supported torch-free full install and build langflow-all from the same reviewed Dockerfile via the explicit full-bundles target
  • update the installation docs to match the default/full contract

Why

The existing release checks validated versions and basic installation health, but they could not detect package, component, starter-flow, or image-tier drift before publication. This makes those tier boundaries version-controlled and release-blocking.

Validation

  • 18 passed: scripts/ci/test_release_inventory.py + scripts/ci/test_release_workflow.py
  • Ruff check and format check
  • actionlint for the new reusable gate plus the modified release/build workflows
  • uv lock --check
  • built the root wheel and verified langflow[bundles] emits exactly lfx-bundles[all-no-torch] metadata
  • parsed the modified multi-stage Dockerfile with a local target build
  • pre-commit hooks, detect-secrets, and IBM Block Secrets

Jira: LE-1873

Summary by CodeRabbit

  • New Features

    • Added a full-bundles container image tier, including long-tail bundle providers.
    • Added release inventory checks for Python packages and container images across supported configurations.
    • Added a bundles installation option for including reviewed, torch-free bundle providers.
    • Added validation for extending the core image with additional providers.
  • Bug Fixes

    • Release publishing and image builds now require successful inventory validation.
  • Documentation

    • Clarified bundle installation options and torch-related dependency behavior.

@coderabbitai

coderabbitai Bot commented Jul 22, 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: f0634190-a9e7-45c0-b29d-5254bd18d887

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

Adds release inventory contracts and validation for Python artifacts and Docker images, gates release publication on those checks, and introduces a full-bundles Docker image tier with updated installation documentation.

Changes

Release inventory and bundle release flow

Layer / File(s) Summary
Inventory contract and bundle dependency shape
pyproject.toml, scripts/ci/release_inventory_contract.json
Defines Python and image profiles for core, default, and full release tiers, and adds the bundles optional dependency.
Inventory collection and validation
scripts/ci/check_release_inventory.py, scripts/ci/test_release_inventory.py
Collects installed distributions, entry points, bundles, files, and module checks; validates them against the contract and tests contract and workflow consistency.
Reusable Python and image inventory gate
.github/workflows/release-inventory-gate.yml, scripts/ci/core_extension.Dockerfile
Validates wheel and image inventories across supported matrices, checks runtime health, and verifies downstream extension of the core image.
Release publication and Docker build gating
.github/workflows/release.yml
Invokes the inventory gate, strengthens main-wheel composition checks, and requires inventory results for publication and Docker build jobs.
Full-bundles Docker target
docker/build_and_push.Dockerfile, .github/workflows/docker-build-v2.yml
Adds the full-bundles builder and image target, then uses it for Docker Hub and GHCR publishing.
Bundle installation documentation
docs/docs/Components/components-bundles.mdx, docs/docs/Lfx/lfx-compatibility.mdx, docs/docs/_partial-bundle-lfx-bundles-install.mdx
Clarifies torch-free Langflow installs, standalone LFX bundle installs, and opt-in long-tail providers.

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

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant InventoryGate
  participant InventoryChecker
  participant DockerImages
  ReleaseWorkflow->>InventoryGate: Invoke gate with artifacts and versions
  InventoryGate->>InventoryChecker: Validate wheel inventories
  InventoryGate->>DockerImages: Build and run image targets
  DockerImages->>InventoryChecker: Run containerized inventory checks
  InventoryGate-->>ReleaseWorkflow: Return inventory result
  ReleaseWorkflow->>ReleaseWorkflow: Gate publishing and Docker builds
Loading

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: mendonk

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Quality And Coverage ⚠️ Warning Tests cover contract/workflow wiring and validate_inventory, but not collect_inventory, run_module_checks, or end-to-end CLI/report generation. Add unit tests that monkeypatch importlib.metadata/subprocess for collect_inventory and run_module_checks, plus a main() test asserting JSON report/output.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding release inventory gates for core and full release paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Test Coverage For New Implementations ✅ Passed Yes—scripts/ci/test_release_inventory.py adds real regression coverage for the new contract, gate workflow, bundle extra, and inventory validator, with correct test_*.py naming.
Test File Naming And Structure ✅ Passed New tests use the repo’s existing scripts/ci/test_*.py pattern, pytest-style test_ functions, and cover positive and negative cases without misplaced integration content.
Excessive Mock Usage Warning ✅ Passed The new/modified tests use real file, TOML, and workflow assertions; no mock imports or patching were found.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/le-1873-inventory-release-gates

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.

@erichare
erichare force-pushed the fix/le-1873-inventory-release-gates branch from 66fae52 to 68eac7e Compare July 22, 2026 00:21
@erichare
erichare force-pushed the fix/le-1873-inventory-release-gates branch from 68eac7e to ee50705 Compare July 22, 2026 00:23
@github-actions

This comment has been minimized.

@erichare
erichare marked this pull request as ready for review July 22, 2026 00:25
@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

This comment has been minimized.

@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: 3

🤖 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/release-inventory-gate.yml:
- Around line 57-60: Set persist-credentials to false in the with configuration
of both actions/checkout steps: the python-inventory checkout at
.github/workflows/release-inventory-gate.yml lines 57-60 and the image-inventory
checkout at lines 196-199. Neither checkout pushes changes, so disable token
persistence for both sites.
- Around line 212-221: Update the workflow step’s docker build arguments to
receive the main and core versions through an env block, then reference the
corresponding shell variables in common_args instead of interpolating inputs
directly in run. Preserve the existing build targets and image tags.

In @.github/workflows/release.yml:
- Around line 1601-1633: Add a least-privilege permissions block to the
release-inventory job before its reusable workflow invocation, granting only the
read access required by release-inventory-gate.yml, such as contents: read, and
no broader token permissions.
🪄 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: 0e3973a6-9930-4439-87b3-edd24113d4f3

📥 Commits

Reviewing files that changed from the base of the PR and between b8b12f5 and ee50705.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/docker-build-v2.yml
  • .github/workflows/release-inventory-gate.yml
  • .github/workflows/release.yml
  • docker/build_and_push.Dockerfile
  • docs/docs/Components/components-bundles.mdx
  • docs/docs/Lfx/lfx-compatibility.mdx
  • docs/docs/_partial-bundle-lfx-bundles-install.mdx
  • pyproject.toml
  • scripts/ci/check_release_inventory.py
  • scripts/ci/core_extension.Dockerfile
  • scripts/ci/release_inventory_contract.json
  • scripts/ci/test_release_inventory.py

Comment on lines +57 to +60
- name: Check out release contract
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on both checkouts. Both actions/checkout steps persist the GITHUB_TOKEN in .git/config, and later steps run downloaded wheels and docker build, so the token is reachable by executed code; disable persistence since neither step pushes.

  • .github/workflows/release-inventory-gate.yml#L57-L60: add persist-credentials: false under the with: of the python-inventory checkout.
  • .github/workflows/release-inventory-gate.yml#L196-L199: add persist-credentials: false under the with: of the image-inventory checkout.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 57-60: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 1 file
  • .github/workflows/release-inventory-gate.yml#L57-L60 (this comment)
  • .github/workflows/release-inventory-gate.yml#L196-L199
🤖 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/release-inventory-gate.yml around lines 57 - 60, Set
persist-credentials to false in the with configuration of both actions/checkout
steps: the python-inventory checkout at
.github/workflows/release-inventory-gate.yml lines 57-60 and the image-inventory
checkout at lines 196-199. Neither checkout pushes changes, so disable token
persistence for both sites.

Source: Linters/SAST tools

Comment on lines +212 to +221
run: |
set -euo pipefail
common_args=(
--build-arg "MAIN_VERSION=${{ inputs.main-version }}"
--build-arg "CORE_VERSION=${{ inputs.core-version }}"
-f docker/build_and_push.Dockerfile
)
docker build "${common_args[@]}" --target core -t "langflow-inventory:core-${{ matrix.arch }}" .
docker build "${common_args[@]}" --target full -t "langflow-inventory:default-${{ matrix.arch }}" .
docker build "${common_args[@]}" --target full-bundles -t "langflow-inventory:full-${{ matrix.arch }}" .

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the workflow and inspect the relevant section with line numbers.
file=".github/workflows/release-inventory-gate.yml"
wc -l "$file"
sed -n '180,240p' "$file" | cat -n

Repository: langflow-ai/langflow

Length of output: 2985


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find how these inputs are defined and used elsewhere in the workflow.
rg -n "main-version|core-version|persist-credentials|docker build|build-arg" .github/workflows/release-inventory-gate.yml

Repository: langflow-ai/langflow

Length of output: 803


Avoid interpolating workflow inputs directly in run.

${{ inputs.main-version }} and ${{ inputs.core-version }} are expanded into the script before the shell runs, so pass them through env: and reference shell variables instead.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 215-215: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[error] 216-216: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 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/release-inventory-gate.yml around lines 212 - 221, Update
the workflow step’s docker build arguments to receive the main and core versions
through an env block, then reference the corresponding shell variables in
common_args instead of interpolating inputs directly in run. Preserve the
existing build targets and image tags.

Source: Linters/SAST tools

Comment on lines +1601 to +1633
release-inventory:
name: Validate release inventories
needs:
[
build-base,
build-bundles,
build-core,
build-lfx,
build-main,
build-sdk,
determine-core-version,
determine-main-version,
test-cross-platform,
]
if: |
always() &&
!cancelled() &&
(needs.test-cross-platform.result == 'success' || needs.test-cross-platform.result == 'skipped') &&
(needs.build-core.result == 'success' ||
needs.build-main.result == 'success' ||
inputs.build_docker_core ||
inputs.build_docker_main)
uses: ./.github/workflows/release-inventory-gate.yml
with:
ref: ${{ inputs.release_tag }}
main-version: ${{ needs.determine-main-version.outputs.version }}
core-version: ${{ needs.determine-core-version.outputs.version || needs.determine-main-version.outputs.version }}
sdk-artifact-name: ${{ needs.build-sdk.result == 'success' && 'dist-sdk' || '' }}
lfx-artifact-name: ${{ needs.build-lfx.result == 'success' && 'dist-lfx' || '' }}
base-artifact-name: ${{ needs.build-base.result == 'success' && 'dist-base' || '' }}
core-artifact-name: ${{ needs.build-core.result == 'success' && 'dist-core' || '' }}
main-artifact-name: ${{ needs.build-main.result == 'success' && 'dist-main' || '' }}
bundles-artifact-name: ${{ needs.build-bundles.result == 'success' && needs.build-bundles.outputs.bundles-found == '1' && 'dist-bundles' || '' }}

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Add a least-privilege permissions: block for the reusable gate call.

The release-inventory job (and the gate it calls) runs with the workflow's default token permissions since no permissions: is declared. The gate only reads artifacts and builds/validates images, so it can be constrained (e.g. contents: read).

🔒 Suggested constraint
   release-inventory:
     name: Validate release inventories
+    permissions:
+      contents: read
     needs:
📝 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
release-inventory:
name: Validate release inventories
needs:
[
build-base,
build-bundles,
build-core,
build-lfx,
build-main,
build-sdk,
determine-core-version,
determine-main-version,
test-cross-platform,
]
if: |
always() &&
!cancelled() &&
(needs.test-cross-platform.result == 'success' || needs.test-cross-platform.result == 'skipped') &&
(needs.build-core.result == 'success' ||
needs.build-main.result == 'success' ||
inputs.build_docker_core ||
inputs.build_docker_main)
uses: ./.github/workflows/release-inventory-gate.yml
with:
ref: ${{ inputs.release_tag }}
main-version: ${{ needs.determine-main-version.outputs.version }}
core-version: ${{ needs.determine-core-version.outputs.version || needs.determine-main-version.outputs.version }}
sdk-artifact-name: ${{ needs.build-sdk.result == 'success' && 'dist-sdk' || '' }}
lfx-artifact-name: ${{ needs.build-lfx.result == 'success' && 'dist-lfx' || '' }}
base-artifact-name: ${{ needs.build-base.result == 'success' && 'dist-base' || '' }}
core-artifact-name: ${{ needs.build-core.result == 'success' && 'dist-core' || '' }}
main-artifact-name: ${{ needs.build-main.result == 'success' && 'dist-main' || '' }}
bundles-artifact-name: ${{ needs.build-bundles.result == 'success' && needs.build-bundles.outputs.bundles-found == '1' && 'dist-bundles' || '' }}
release-inventory:
name: Validate release inventories
permissions:
contents: read
needs:
[
build-base,
build-bundles,
build-core,
build-lfx,
build-main,
build-sdk,
determine-core-version,
determine-main-version,
test-cross-platform,
]
if: |
always() &&
!cancelled() &&
(needs.test-cross-platform.result == 'success' || needs.test-cross-platform.result == 'skipped') &&
(needs.build-core.result == 'success' ||
needs.build-main.result == 'success' ||
inputs.build_docker_core ||
inputs.build_docker_main)
uses: ./.github/workflows/release-inventory-gate.yml
with:
ref: ${{ inputs.release_tag }}
main-version: ${{ needs.determine-main-version.outputs.version }}
core-version: ${{ needs.determine-core-version.outputs.version || needs.determine-main-version.outputs.version }}
sdk-artifact-name: ${{ needs.build-sdk.result == 'success' && 'dist-sdk' || '' }}
lfx-artifact-name: ${{ needs.build-lfx.result == 'success' && 'dist-lfx' || '' }}
base-artifact-name: ${{ needs.build-base.result == 'success' && 'dist-base' || '' }}
core-artifact-name: ${{ needs.build-core.result == 'success' && 'dist-core' || '' }}
main-artifact-name: ${{ needs.build-main.result == 'success' && 'dist-main' || '' }}
bundles-artifact-name: ${{ needs.build-bundles.result == 'success' && needs.build-bundles.outputs.bundles-found == '1' && 'dist-bundles' || '' }}
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 1601-1633: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

🤖 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/release.yml around lines 1601 - 1633, Add a
least-privilege permissions block to the release-inventory job before its
reusable workflow invocation, granting only the read access required by
release-inventory-gate.yml, such as contents: read, and no broader token
permissions.

Source: Linters/SAST tools

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.14%. Comparing base (0cb1e5b) to head (c498630).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.12.0   #14203      +/-   ##
==================================================
- Coverage           61.31%   61.14%   -0.18%     
==================================================
  Files                2342     2339       -3     
  Lines              237006   236909      -97     
  Branches            33341    33297      -44     
==================================================
- Hits               145330   144864     -466     
- Misses              89879    90248     +369     
  Partials             1797     1797              
Flag Coverage Δ
backend 68.84% <ø> (+0.06%) ⬆️
frontend 59.27% <ø> (-0.29%) ⬇️
lfx 60.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 106 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

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 46%
46.8% (66856/142853) 70.12% (9386/13385) 45.28% (1538/3396)

Unit Test Results

Tests Skipped Failures Errors Time
5343 0 💤 0 ❌ 0 🔥 19m 55s ⏱️

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@erichare
erichare merged commit 408b598 into release-1.12.0 Jul 22, 2026
123 of 125 checks passed
@erichare
erichare deleted the fix/le-1873-inventory-release-gates branch July 22, 2026 03:03
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.

1 participant