ci: Add LFX release workflow and update nightly build script#9663
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough
Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Workflow Dispatch
participant CI as ci
participant BM as build-main
participant PM as publish-main
participant BL as build-lfx
participant TL as test-lfx-cross-platform
participant PL as publish-lfx
participant CR as create_release
Dev->>CI: Trigger (inputs: create_release, release_lfx)
CI-->>BM: If main release path
BM-->>PM: On success
PM-->>CR: Needs publish-main result
alt release_lfx == true
CI-->>BL: Build LFX (outputs: version)
BL-->>TL: Matrix install/test LFX
TL-->>PL: On success
PL-->>CR: Needs publish-lfx result
end
Note over CR: Run if either publish-main or publish-lfx succeeded
CR->>CR: Download dist-main if PM succeeded
CR->>CR: Download dist-lfx if PL succeeded
CR->>CR: Determine tag from main or LFX version
CR-->>Dev: Create GitHub Release with artifacts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/release.yml (2)
52-52: Normalize boolean input checks (inputs vs github.event.inputs).Here you use github.event.inputs...=='true', while other jobs use inputs.xxx == true. Pick one style repo-wide to avoid surprise evaluation differences.
217-241: Cross-platform LFX install test: LGTM.Downloads artifact, sets Python matrix, installs wheel, and checks CLI. Consider adding a minimal import smoke test (python -c "import lfx; print(lfx.version)") for extra confidence.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/nightly_build.yml(1 hunks).github/workflows/release.yml(3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release.yml
428-428: property "needs" is not defined in object type {outputs: {}; result: string}
(expression)
428-428: property "needs" is not defined in object type {outputs: {}; result: string}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: create-nightly-tag
🔇 Additional comments (4)
.github/workflows/nightly_build.yml (1)
86-86: Confirm update_pyproject_combined.py now accepts 4 args (incl. LFX_TAG).Invocation change looks right; please ensure the script handles the new arity and LFX propagation cleanly. Consider quoting vars to avoid accidental globbing.
.github/workflows/release.yml (3)
42-46: New input release_lfx: LGTM.Clear description, sensible default false.
333-379: LFX build flow: LGTM.Version guard, clean build dir, uv build to dist/, CLI smoke test, artifact upload — all good.
380-401: LFX publish: LGTM.Downloads artifact and publishes with UV_PUBLISH_TOKEN.
| needs: [publish-main, publish-lfx] | ||
| if: always() && inputs.create_release == 'true' && (needs.publish-main.result == 'success' || needs.publish-lfx.result == 'success') | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| if: needs.publish-main.result == 'success' | ||
| with: | ||
| name: dist-main | ||
| path: dist | ||
| - uses: actions/download-artifact@v4 | ||
| if: needs.publish-lfx.result == 'success' | ||
| with: | ||
| name: dist-lfx | ||
| path: dist-lfx | ||
| - name: Create Release | ||
| uses: ncipollo/release-action@v1 | ||
| with: | ||
| artifacts: "dist/*" | ||
| artifacts: | | ||
| dist/* | ||
| dist-lfx/* | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| draft: false | ||
| generateReleaseNotes: true | ||
| prerelease: ${{ inputs.pre_release }} | ||
| tag: ${{ needs.publish-main.needs.build-main.outputs.version }} | ||
| tag: ${{ needs.publish-main.needs.build-main.outputs.version || needs.publish-lfx.needs.build-lfx.outputs.version }} | ||
| commit: ${{ github.ref }} |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix invalid needs chaining and conditional artifacts to prevent release failure.
- actionlint error is correct: needs.publish-main.needs.build-main... is invalid. You can’t nest needs.
- Also, release-action may fail if artifacts list contains a non-existent path (e.g., only LFX released but dist/* is included).
Apply this diff to make create_release robust by:
- Adding build-main and build-lfx to needs.
- Computing the artifacts list based on which publish jobs succeeded.
- Referencing build job outputs directly for tag.
create_release:
name: Create Release
runs-on: ubuntu-latest
- needs: [publish-main, publish-lfx]
- if: always() && inputs.create_release == 'true' && (needs.publish-main.result == 'success' || needs.publish-lfx.result == 'success')
+ needs: [publish-main, publish-lfx, build-main, build-lfx]
+ if: always() && inputs.create_release == 'true' && (needs.publish-main.result == 'success' || needs.publish-lfx.result == 'success')
steps:
- uses: actions/download-artifact@v4
if: needs.publish-main.result == 'success'
with:
name: dist-main
path: dist
- uses: actions/download-artifact@v4
if: needs.publish-lfx.result == 'success'
with:
name: dist-lfx
path: dist-lfx
+ - name: Prepare artifact list
+ id: artifacts
+ shell: bash
+ run: |
+ set -euo pipefail
+ paths=""
+ if [ "${{ needs.publish-main.result }}" = "success" ]; then
+ paths="${paths}dist/*"$'\n'
+ fi
+ if [ "${{ needs.publish-lfx.result }}" = "success" ]; then
+ paths="${paths}dist-lfx/*"$'\n'
+ fi
+ {
+ echo 'list<<EOF'
+ printf "%s" "$paths"
+ echo
+ echo EOF
+ } >> "$GITHUB_OUTPUT"
- name: Create Release
uses: ncipollo/release-action@v1
with:
- artifacts: |
- dist/*
- dist-lfx/*
+ artifacts: ${{ steps.artifacts.outputs.list }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
generateReleaseNotes: true
prerelease: ${{ inputs.pre_release }}
- tag: ${{ needs.publish-main.needs.build-main.outputs.version || needs.publish-lfx.needs.build-lfx.outputs.version }}
+ tag: ${{ (needs.publish-main.result == 'success' && needs.build-main.outputs.version) || (needs.publish-lfx.result == 'success' && needs.build-lfx.outputs.version) }}
commit: ${{ github.ref }}Optional (outside this hunk): If you prefer keeping create_release needs minimal, expose versions from publish jobs and reference them instead:
- In publish-main, add outputs: version: ${{ needs.build-main.outputs.version }}
- In publish-lfx, add outputs: version: ${{ needs.build-lfx.outputs.version }}
- Then use tag: ${{ needs.publish-main.outputs.version || needs.publish-lfx.outputs.version }}.
📝 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.
| needs: [publish-main, publish-lfx] | |
| if: always() && inputs.create_release == 'true' && (needs.publish-main.result == 'success' || needs.publish-lfx.result == 'success') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| if: needs.publish-main.result == 'success' | |
| with: | |
| name: dist-main | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| if: needs.publish-lfx.result == 'success' | |
| with: | |
| name: dist-lfx | |
| path: dist-lfx | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "dist/*" | |
| artifacts: | | |
| dist/* | |
| dist-lfx/* | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: false | |
| generateReleaseNotes: true | |
| prerelease: ${{ inputs.pre_release }} | |
| tag: ${{ needs.publish-main.needs.build-main.outputs.version }} | |
| tag: ${{ needs.publish-main.needs.build-main.outputs.version || needs.publish-lfx.needs.build-lfx.outputs.version }} | |
| commit: ${{ github.ref }} | |
| create_release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [publish-main, publish-lfx, build-main, build-lfx] | |
| if: always() && inputs.create_release == 'true' && (needs.publish-main.result == 'success' || needs.publish-lfx.result == 'success') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| if: needs.publish-main.result == 'success' | |
| with: | |
| name: dist-main | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| if: needs.publish-lfx.result == 'success' | |
| with: | |
| name: dist-lfx | |
| path: dist-lfx | |
| - name: Prepare artifact list | |
| id: artifacts | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| paths="" | |
| if [ "${{ needs.publish-main.result }}" = "success" ]; then | |
| paths="${paths}dist/*"$'\n' | |
| fi | |
| if [ "${{ needs.publish-lfx.result }}" = "success" ]; then | |
| paths="${paths}dist-lfx/*"$'\n' | |
| fi | |
| { | |
| echo 'list<<EOF' | |
| printf "%s" "$paths" | |
| echo | |
| echo EOF | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: ${{ steps.artifacts.outputs.list }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: false | |
| generateReleaseNotes: true | |
| prerelease: ${{ inputs.pre_release }} | |
| tag: ${{ (needs.publish-main.result == 'success' && needs.build-main.outputs.version) || (needs.publish-lfx.result == 'success' && needs.build-lfx.outputs.version) }} | |
| commit: ${{ github.ref }} |
🧰 Tools
🪛 actionlint (1.7.7)
428-428: property "needs" is not defined in object type {outputs: {}; result: string}
(expression)
428-428: property "needs" is not defined in object type {outputs: {}; result: string}
(expression)
🤖 Prompt for AI Agents
.github/workflows/release.yml around lines 405-429: the Create Release job
incorrectly references nested needs (needs.publish-main.needs.build-main) and
always passes both artifact paths which can fail if one artifact set is missing;
update the job's needs to include build-main and build-lfx (so you can reference
needs.build-main.outputs.version and needs.build-lfx.outputs.version directly),
change the tag to use those build outputs (e.g., tag: ${{
needs.build-main.outputs.version || needs.build-lfx.outputs.version }}), and
build the artifacts input conditionally so only existing artifact paths are
supplied (use per-artifact if: conditions or construct the artifacts list from
the successful publish jobs) so the release-action never receives non-existent
paths; alternatively expose version outputs from publish-main/publish-lfx and
use needs.publish-main.outputs.version || needs.publish-lfx.outputs.version for
the tag.
…pt for correct path
|



Introduce a new workflow for LFX releases, including cross-platform testing and integration into the nightly build process. Update the versioning script to accommodate LFX_TAG.
Summary by CodeRabbit
New Features
Tests
Chores