langflow icon indicating copy to clipboard operation
langflow copied to clipboard

fix(ci): correct nightly workflow to publish 1.11.0 versions to -nightly packages

Open vjgit96 opened this issue 5 months ago β€’ 6 comments

Description

Fixes nightly builds publishing to wrong PyPI packages, causing langflow-base-nightly to show 1.10.0.dev70 instead of 1.11.0.devX. Also adds automatic frontend version updates per review feedback.

Problem

The release-1.11.0 branch had an outdated nightly build workflow that failed to update package names from langflow-base to langflow-base-nightly before creating git tags. This caused:

  • Nightly builds generated correct v1.11.0.devX tags βœ…
  • BUT packages were published to langflow-base (stable) instead of langflow-base-nightly ❌
  • PyPI shows langflow-base has 1.11.0.dev0-9, while langflow-base-nightly stuck at 1.10.0.dev70

Root Cause: The workflow comment incorrectly stated "The nightly keeps canonical package names" when it should rename to -nightly suffix.

Solution

  1. Backported the fixed nightly workflow from release-1.10.0 branch:

    • Updated commit message from "Update version for nightly" to "Update version and project name"
    • Added bundle pyproject.toml files to git commit when modified
    • Fixed comment to correctly describe nightly package renaming behavior
  2. Added automatic frontend version updates (per @Adam-Aghili review):

    • Created scripts/ci/update_frontend_version.py to update package.json
    • Integrated into nightly workflow to keep frontend/backend versions in sync
    • Added src/frontend/package.json to git commit

Changes

  • .github/workflows/nightly_build.yml - Fixed package renaming + added frontend version update
  • scripts/ci/update_frontend_version.py - New script to update frontend package.json
  • .secrets.baseline - Updated by pre-commit hook

Testing

After merge, the next nightly build (00:00 UTC) will:

  1. Correctly update package names to -nightly suffix
  2. Update frontend package.json version to match backend
  3. Create git tag with proper package names
  4. Publish 1.11.0.dev10+ to langflow-base-nightly on PyPI

Verification

# After next nightly build, verify:
# 1. PyPI shows correct version
curl -s https://pypi.org/pypi/langflow-base-nightly/json | python3 -c "import sys, json; print(json.load(sys.stdin)['info']['version'])"
# Expected: 1.11.0.dev10 (or higher)

# 2. Git tag has correct package name
git fetch --tags
git show v1.11.0.dev10:src/backend/base/pyproject.toml | grep "^name ="
# Expected: name = "langflow-base-nightly"

# 3. Frontend version matches
git show v1.11.0.dev10:src/frontend/package.json | grep '"version"'
# Expected: "version": "1.11.0.dev10"

vjgit96 avatar Jun 16 '26 20:06 vjgit96

Review Change Stack

Walkthrough

The nightly build workflow's "Commit tag" step is updated to conditionally detect and stage src/bundles/*/pyproject.toml files before committing, alongside the existing top-level files. The commit message is changed from a version-specific string to "Update version and project name". The secrets baseline is updated to reflect the shifted line number and a new timestamp.

Changes

Nightly Build Workflow and Secrets Baseline

Layer / File(s) Summary
Conditional bundle pyproject staging and secrets baseline refresh
.github/workflows/nightly_build.yml, .secrets.baseline
Adds a conditional git add for src/bundles/*/pyproject.toml in the create-nightly-tag commit step and updates the commit message to "Update version and project name"; secrets baseline line number updated from 308 to 312 and generated_at timestamp refreshed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • langflow-ai/langflow#13208: Directly overlaps β€” both PRs update the create-nightly-tag step to stage src/bundles/*/pyproject.toml and use the "Update version and project name" commit message.
  • langflow-ai/langflow#13210: Both PRs modify the same create-nightly-tag "Commit tag" step to conditionally stage src/bundles/*/pyproject.toml.
  • langflow-ai/langflow#13195: Both PRs modify nightly commit/tag logic to conditionally stage src/bundles/*/pyproject.toml with additional guard handling.

Suggested labels

bug

πŸš₯ Pre-merge checks | βœ… 9
βœ… Passed checks (9 passed)
Check name Status Explanation
Title check βœ… Passed The title directly references the main issue being fixed: correcting the nightly workflow to publish 1.11.0 versions to the correct -nightly packages, which aligns with the PR's core objective of fixing the CI workflow bug.
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 PR is a CI/CD workflow fix with no application code, components, or new features - only GitHub Actions configuration and auto-generated baseline file changes.
Test Quality And Coverage βœ… Passed This PR modifies GitHub Actions workflow configuration files (.github/workflows/nightly_build.yml and .secrets.baseline), not source code implementations. Workflow configuration changes don't requi...
Test File Naming And Structure βœ… Passed This PR only modifies CI/CD workflow and configuration files (.github/workflows/nightly_build.yml and .secrets.baseline), with no changes to test files. The check for test file naming and structure...
Excessive Mock Usage Warning βœ… Passed No test files modified in this PR; check focuses on test file mock usage which is not applicable to workflow and configuration file changes.
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ“ Generate docstrings
  • [ ] Create stacked PR
  • [ ] Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Commit unit tests in branch fix/LE-1571-nightly-version-1.11.0

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 and usage tips.

coderabbitai[bot] avatar Jun 16 '26 20:06 coderabbitai[bot]

βœ… Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! πŸŽ‰

Advisory check only β€” never blocks merge.

github-actions[bot] avatar Jun 16 '26 20:06 github-actions[bot]

we should also auto update the package.json if we can

βœ… Added in 25363530c8 - frontend package.json now auto-updates with backend versions

vjgit96 avatar Jun 16 '26 21:06 vjgit96

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 43%
43.39% (57785/133148) 69.06% (7842/11355) 41.64% (1299/3119)

Unit Test Results

Tests Skipped Failures Errors Time
4945 0 :zzz: 0 :x: 0 :fire: 11m 58s :stopwatch:

github-actions[bot] avatar Jun 16 '26 21:06 github-actions[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 58.46%. Comparing base (40d7814) to head (2536353). :warning: Report is 209 commits behind head on release-1.11.0.

:x: Your project check has failed because the head coverage (54.34%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.11.0   #13683      +/-   ##
==================================================
- Coverage           58.55%   58.46%   -0.10%     
==================================================
  Files                2304     2305       +1     
  Lines              219291   220050     +759     
  Branches            32938    34201    +1263     
==================================================
+ Hits               128414   128657     +243     
- Misses              89418    89934     +516     
  Partials             1459     1459              
Flag Coverage Ξ”
frontend 57.76% <ΓΈ> (-0.14%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more. see 185 files with indirect coverage changes

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

codecov[bot] avatar Jun 16 '26 21:06 codecov[bot]

merge conflict.

I also noticed we arent publishing to docker hub for nightly anymore https://hub.docker.com/r/langflowai/langflow-nightly and we don't see the pre releases for https://hub.docker.com/r/langflowai/langflow

Adam-Aghili avatar Jun 17 '26 17:06 Adam-Aghili

merge conflict.

I also noticed we arent publishing to docker hub for nightly anymore https://hub.docker.com/r/langflowai/langflow-nightly and we don't see the pre releases for https://hub.docker.com/r/langflowai/langflow

Thanks Adam, good catch. Your comment covered both Docker and PyPI visibility concerns. I re-checked: nightly publishing is now intentionally under canonical langflow/langflow-base dev releases (not langflow-nightly), and the Docker nightly visibility issue was addressed in later CI updates. So this PR is no longer needed for either concern, and I’m planning to close it unless we decide to revert policy.

vjgit96 avatar Jul 14 '26 20:07 vjgit96

Closing this since the original issue is no longer applicable.

After re-checking with release discussions and current CI behavior:

  • Nightly Python releases are intentionally published as .devN under the canonical langflow / langflow-base packages (not langflow-nightly).
  • Docker nightly visibility concerns were addressed separately in later CI updates.
  • So this PR is no longer needed to achieve the intended behavior.

Thanks everyone for the review and for raising the edge cases.

vjgit96 avatar Jul 14 '26 20:07 vjgit96