Skip to content

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Oct 7, 2025

Without this patch, every 4.0 release will be marked as the latest release.
This could be inconvenient for releasing process of 4.0.x.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Chores
    • Updated release process to publish two distinct channels: 4.0 releases explicitly marked as non-latest and 4.1 releases marked as latest when applicable.
    • Added conditional routing so 4.1 follows the latest release path while 4.0 follows a non-latest path.
    • Aligned documentation release steps to the same dual-path behavior so docs reflect the new latest/non-latest distinction.

@cosmo0920 cosmo0920 marked this pull request as ready for review October 7, 2025 08:05
Copy link

coderabbitai bot commented Oct 7, 2025

Walkthrough

Staging-release workflow was split into two release paths: versions starting with "4.1" follow a new "4.1 and latest" path (make_latest: true); "4.0" releases follow a "4.0 - not latest" path (make_latest: false). Docs-related release steps were similarly adjusted.

Changes

Cohort / File(s) Summary
Workflow: staged releases by version
.github/workflows/staging-release.yaml
Introduced separate conditional paths for startsWith(inputs.version, '4.1') and the 4.0 path. Added a "Release 4.1 and latest" (make_latest: true) branch and adjusted the "Release 4.0 - not latest" (make_latest: false) branch; duplicated/updated corresponding docs checkout/release steps and ref handling.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant GH as GitHub Actions (staging-release)
    participant Job as Release Job
    participant Rel as create-release Action

    Dev->>GH: Dispatch workflow with inputs.version
    GH->>Job: Start release job
    alt inputs.version startsWith "4.1"
        Note over Job,Rel: 4.1 path — make_latest: true
        Job->>Rel: Create release (tag: 4.1.x, make_latest: true)
        Rel-->>Job: Release created
    else
        Note over Job,Rel: 4.0 path — make_latest: false
        Job->>Rel: Create release (tag: 4.0.x, make_latest: false)
        Rel-->>Job: Release created
    end
    Job-->>GH: Job complete
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

backport to v4.0.x

Suggested reviewers

  • niedbalski
  • celalettin1286
  • patrick-stephens

Poem

I hop through YAML, nudge a tag with care,
4.0 stays gentle, 4.1 claims the chair.
Pipelines hum, the carrots gleam bright,
Bunny flips the switch and sleeps tonight. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title explicitly references workflows and the 4.0 branch change to stop marking those releases as latest, which aligns with the pull request’s main change. Although the wording could be slightly polished for clarity, it accurately summarizes the core update.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cosmo0920-make-only-4.1-as-latest-for-releasing

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65a08f3 and c37031f.

📒 Files selected for processing (1)
  • .github/workflows/staging-release.yaml (2 hunks)

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.

Copy link

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/staging-release.yaml (2)

504-507: Bug: “latest” container tags still update for 4.0.x; restrict to 4.1 only

Condition matches any 4.x, so 4.0 releases will still publish latest tags. Update condition and comment.

Apply:

-  staging-release-images-latest-tags:
-    # Only update latest tags for 4.0 releases
-    if: startsWith(github.event.inputs.version, '4.')
+  staging-release-images-latest-tags:
+    # Only update latest tags for 4.1 releases
+    if: startsWith(github.event.inputs.version, '4.1')

964-970: Handle docs checkout for 4.1 and explicit refs

  • Rename the 4.0 step to “Release 4.0 – not latest” and add ref: 4.0.
  • Add a new “Release 4.1 and latest” step under startsWith(inputs.version, '4.1') checking out fluent/fluent-bit-docs at master.

Confirm that the docs repo uses branch 4.0 for 4.0.x and master for 4.1+ (adjust refs if different).

🧹 Nitpick comments (2)
.github/workflows/staging-release.yaml (2)

834-844: 4.0 release correctly marked non-latest; add target_commitish for consistency

Good change. For parity with 2.x/3.x blocks, set target_commitish to the 4.0 branch.

       - name: Release 4.0 - not latest
         uses: softprops/action-gh-release@v2
         if: startsWith(inputs.version, '4.0')
         with:
           body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
           draft: false
           generate_release_notes: true
           name: "Fluent Bit ${{ inputs.version }}"
           tag_name: v${{ inputs.version }}
+          target_commitish: '4.0'
           make_latest: false

845-855: 4.1 release as latest: add target_commitish for clarity

Works as intended. Consider pinning to master explicitly.

       - name: Release 4.1 and latest
         uses: softprops/action-gh-release@v2
         if: startsWith(inputs.version, '4.1')
         with:
           body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
           draft: false
           generate_release_notes: true
           name: "Fluent Bit ${{ inputs.version }}"
           tag_name: v${{ inputs.version }}
+          target_commitish: 'master'
           make_latest: true
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ffd27bc and 21112c9.

📒 Files selected for processing (1)
  • .github/workflows/staging-release.yaml (1 hunks)

@patrick-stephens
Copy link
Collaborator

@cosmo0920 let's ensure the target commitish is set like CodeRabbit says too

@cosmo0920 cosmo0920 force-pushed the cosmo0920-make-only-4.1-as-latest-for-releasing branch from 21112c9 to 65a08f3 Compare October 10, 2025 09:43
Copy link

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21112c9 and 65a08f3.

📒 Files selected for processing (1)
  • .github/workflows/staging-release.yaml (2 hunks)

@cosmo0920 cosmo0920 force-pushed the cosmo0920-make-only-4.1-as-latest-for-releasing branch from 65a08f3 to c37031f Compare October 10, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants