Skip to content

ci: Add LFX release workflow and update nightly build script#9663

Merged
ogabrielluiz merged 9 commits into
mainfrom
fix-lfx-ci
Sep 3, 2025
Merged

ci: Add LFX release workflow and update nightly build script#9663
ogabrielluiz merged 9 commits into
mainfrom
fix-lfx-ci

Conversation

@ogabrielluiz
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz commented Sep 2, 2025

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

    • Optional LFX release alongside the main package.
    • GitHub Releases now include LFX artifacts when selected.
    • Release tag auto-derives from either main or LFX build.
  • Tests

    • Added cross-platform installation tests for LFX across multiple OS and Python versions.
  • Chores

    • Updated release workflow to support LFX builds, testing, and conditional publishing to PyPI.
    • CI triggers extended to run when LFX release is requested.
    • Nightly build updated to pass an additional tag parameter.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 2, 2025

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.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

  • Nightly workflow: update_pyproject_combined.py now receives LFX_TAG as a fourth argument.
  • Release workflow: introduces optional LFX release path with new jobs (build, cross-platform test, publish), integrates artifacts into GitHub Release, and updates conditions/dependencies to handle LFX alongside main.

Changes

Cohort / File(s) Summary
Nightly workflow argument update
.github/workflows/nightly_build.yml
Passes LFX_TAG as fourth parameter to update_pyproject_combined.py; no other control-flow changes.
Release workflow: LFX support and integration
.github/workflows/release.yml
Adds input release_lfx; adds jobs build-lfx, test-lfx-cross-platform, publish-lfx; updates CI gating; create_release now depends on publish-main and/or publish-lfx; conditionally downloads dist-main/dist-lfx; release tag can derive from main or LFX build outputs.

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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

enhancement, size:L

Suggested reviewers

  • jordanrfrazier
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-lfx-ci

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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.

📥 Commits

Reviewing files that changed from the base of the PR and between e129599 and a3d22a6.

📒 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.

Comment on lines +405 to 429
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 }}
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.

🛠️ Refactor suggestion

⚠️ Potential issue

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.

Suggested change
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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 3, 2025

@ogabrielluiz ogabrielluiz merged commit 52856ff into main Sep 3, 2025
205 of 222 checks passed
@ogabrielluiz ogabrielluiz deleted the fix-lfx-ci branch September 3, 2025 19:39
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