chore: release nightlies from of release branch#12181
Conversation
in preperation for the new release cycle strategy we will move the nightly to be run off the latest release branch. One caveat worth documenting: When we create the release branch we need to bump the verions for base and main immediately or else the ngihtly will run off the branch but will use a preveious release tag I also do not know how to deal with `merge-hash-history-to-main` in this case
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe pull request refactors the nightly build workflow to adopt "release" terminology instead of "main," introduces a new job to resolve release branches, and improves error handling in the PyPI nightly tag script by adding HTTP status validation and None checks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip You can customize the tone of the review comments and chat replies.Configure the |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (44.41%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #12181 +/- ##
==========================================
- Coverage 38.49% 38.48% -0.01%
==========================================
Files 1630 1630
Lines 80456 80456
Branches 12152 12152
==========================================
- Hits 30968 30966 -2
- Misses 47738 47740 +2
Partials 1750 1750
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/nightly_build.yml:
- Around line 62-73: The "Find latest release branch" step (id get_branch) can
emit an empty BRANCH when no refs match; update the shell block to detect if
BRANCH (or branch.txt) is empty after git ls-remote and, if so, print a clear
error and exit non‑zero (e.g., echo "No release-* branch found" >&2; exit 1) so
the workflow fails fast; only write to $GITHUB_OUTPUT and continue when BRANCH
is non-empty.
- Around line 335-343: The reusable workflow call is missing the required input
nightly_tag_main used by release_nightly.yml; update the call that references
./.github/workflows/release_nightly.yml to include nightly_tag_main and set it
to the tag produced by the tag-creation job (e.g. nightly_tag_main: ${{
needs.create-nightly-tag.outputs.main_tag }}), or if the intent was to reuse
nightly_tag_release, explicitly pass nightly_tag_main: ${{
needs.create-nightly-tag.outputs.release_tag }} to satisfy
inputs.nightly_tag_main lookups in the callee.
- Around line 75-76: The validate-inputs job is currently only informational and
doesn't block downstream write jobs; make it gate the write path by adding
validate-inputs as a dependency and requiring its success before running
mutating jobs. Specifically, add validate-inputs to the needs list for jobs that
create tags or push images (e.g., include validate-inputs in the needs array
alongside resolve-release-branch for create-nightly-tag and
release-nightly-build), and change their if conditions to require
needs.validate-inputs.result == 'success' (or check a validate-inputs output
flag like needs.validate-inputs.outputs.skipped != 'true' and result ==
'success') so that create-nightly-tag and release-nightly-build will not run
when validate-inputs was skipped/failed.
🪄 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: a3b8e621-0850-4fbd-be59-7c0de1cc0593
📒 Files selected for processing (3)
.github/workflows/nightly_build.yml.secrets.baselinescripts/ci/pypi_nightly_tag.py
| - name: Find latest release branch | ||
| id: get_branch | ||
| run: | | ||
| git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \ | ||
| | awk '{print $2}' \ | ||
| | sed 's|refs/heads/||' \ | ||
| | sort -V \ | ||
| | tail -n 1 > branch.txt | ||
|
|
||
| BRANCH=$(cat branch.txt) | ||
| echo "branch=$BRANCH" >> $GITHUB_OUTPUT | ||
| echo "Using release branch: $BRANCH" |
There was a problem hiding this comment.
Fail fast when no release-* branch is found.
If git ls-remote returns no matches, branch is emitted as empty and the checkout on Line 92 is no longer pinned to a known release branch. This should stop with a clear error instead of silently proceeding.
🔧 Suggested fix
BRANCH=$(cat branch.txt)
+ if [ -z "$BRANCH" ]; then
+ echo "No release-* branch found in ${{ github.repository }}"
+ exit 1
+ fi
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
echo "Using release branch: $BRANCH"📝 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.
| - name: Find latest release branch | |
| id: get_branch | |
| run: | | |
| git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \ | |
| | awk '{print $2}' \ | |
| | sed 's|refs/heads/||' \ | |
| | sort -V \ | |
| | tail -n 1 > branch.txt | |
| BRANCH=$(cat branch.txt) | |
| echo "branch=$BRANCH" >> $GITHUB_OUTPUT | |
| echo "Using release branch: $BRANCH" | |
| - name: Find latest release branch | |
| id: get_branch | |
| run: | | |
| git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \ | |
| | awk '{print $2}' \ | |
| | sed 's|refs/heads/||' \ | |
| | sort -V \ | |
| | tail -n 1 > branch.txt | |
| BRANCH=$(cat branch.txt) | |
| if [ -z "$BRANCH" ]; then | |
| echo "No release-* branch found in ${{ github.repository }}" | |
| exit 1 | |
| fi | |
| echo "branch=$BRANCH" >> $GITHUB_OUTPUT | |
| echo "Using release branch: $BRANCH" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/nightly_build.yml around lines 62 - 73, The "Find latest
release branch" step (id get_branch) can emit an empty BRANCH when no refs
match; update the shell block to detect if BRANCH (or branch.txt) is empty after
git ls-remote and, if so, print a clear error and exit non‑zero (e.g., echo "No
release-* branch found" >&2; exit 1) so the workflow fails fast; only write to
$GITHUB_OUTPUT and continue when BRANCH is non-empty.
| if: github.repository == 'langflow-ai/langflow' | ||
| needs: resolve-release-branch |
There was a problem hiding this comment.
Make validate-inputs block the write path.
Right now it is informational only. A manual run with push_to_registry=true and either skip flag set still lets create-nightly-tag mutate tags, and release-nightly-build still passes its always() && ... != 'failure' gate because skipped is not failure.
🔧 Suggested wiring
- create-nightly-tag:
- if: github.repository == 'langflow-ai/langflow'
- needs: resolve-release-branch
+ create-nightly-tag:
+ if: github.repository == 'langflow-ai/langflow'
+ needs: [validate-inputs, resolve-release-branch]
...
- release-nightly-build:
- if: github.repository == 'langflow-ai/langflow' && always() && needs.frontend-tests.result != 'failure' && needs.backend-unit-tests.result != 'failure' && needs.build-hash-history.result != 'failure'
+ release-nightly-build:
+ if: github.repository == 'langflow-ai/langflow' && always() && needs.validate-inputs.result == 'success' && needs.frontend-tests.result != 'failure' && needs.backend-unit-tests.result != 'failure' && needs.build-hash-history.result != 'failure'
name: Run Nightly Langflow Build
needs:
[
+ validate-inputs,
create-nightly-tag,
frontend-tests,
backend-unit-tests,
build-hash-history,
]Also applies to: 325-346
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/nightly_build.yml around lines 75 - 76, The
validate-inputs job is currently only informational and doesn't block downstream
write jobs; make it gate the write path by adding validate-inputs as a
dependency and requiring its success before running mutating jobs. Specifically,
add validate-inputs to the needs list for jobs that create tags or push images
(e.g., include validate-inputs in the needs array alongside
resolve-release-branch for create-nightly-tag and release-nightly-build), and
change their if conditions to require needs.validate-inputs.result == 'success'
(or check a validate-inputs output flag like
needs.validate-inputs.outputs.skipped != 'true' and result == 'success') so that
create-nightly-tag and release-nightly-build will not run when validate-inputs
was skipped/failed.
| uses: ./.github/workflows/release_nightly.yml | ||
| with: | ||
| build_docker_base: true | ||
| build_docker_main: true | ||
| build_docker_ep: true | ||
| build_lfx: true | ||
| nightly_tag_main: ${{ needs.create-nightly-tag.outputs.main_tag }} | ||
| nightly_tag_release: ${{ needs.create-nightly-tag.outputs.release_tag }} | ||
| nightly_tag_base: ${{ needs.create-nightly-tag.outputs.base_tag }} | ||
| nightly_tag_lfx: ${{ needs.create-nightly-tag.outputs.lfx_tag }} |
There was a problem hiding this comment.
Restore the reusable workflow input contract.
.github/workflows/release_nightly.yml:26-41 still requires nightly_tag_main, so this call is invalid as written and every downstream inputs.nightly_tag_main lookup in that workflow will be empty. Either keep passing nightly_tag_main here or rename the callee in the same PR.
🔧 Minimal fix
- nightly_tag_release: ${{ needs.create-nightly-tag.outputs.release_tag }}
+ nightly_tag_main: ${{ needs.create-nightly-tag.outputs.release_tag }}🧰 Tools
🪛 actionlint (1.7.11)
[error] 335-335: input "nightly_tag_main" is required by "./.github/workflows/release_nightly.yml" reusable workflow
(workflow-call)
[error] 341-341: input "nightly_tag_release" is not defined in "./.github/workflows/release_nightly.yml" reusable workflow. defined inputs are "build_docker_base", "build_docker_ep", "build_docker_main", "build_lfx", "nightly_tag_base", "nightly_tag_lfx", "nightly_tag_main", "push_to_registry"
(workflow-call)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/nightly_build.yml around lines 335 - 343, The reusable
workflow call is missing the required input nightly_tag_main used by
release_nightly.yml; update the call that references
./.github/workflows/release_nightly.yml to include nightly_tag_main and set it
to the tag produced by the tag-creation job (e.g. nightly_tag_main: ${{
needs.create-nightly-tag.outputs.main_tag }}), or if the intent was to reuse
nightly_tag_release, explicitly pass nightly_tag_main: ${{
needs.create-nightly-tag.outputs.release_tag }} to satisfy
inputs.nightly_tag_main lookups in the callee.
|
@jordanrfrazier I do not know how to deal with |
add clear error when branch does not exist make sure valid inputs is respected in the rest of the jobs/steps release_nightly.yml now uses nightly_tag_release instead of the old nightly_tag_main
in preperation for the new release cycle strategy we will move the nightly to be run off the latest release branch.
One caveat worth documenting: When we create the release branch we need to bump the verions for base and main immediately or else the ngihtly will run off the branch but will use a preveious release tag
I also do not know how to deal with
merge-hash-history-to-mainin this caseSummary by CodeRabbit
Bug Fixes
Chores