-
Notifications
You must be signed in to change notification settings - Fork 1.8k
workflows: Make not to be the latest release for 4.0 branch #10993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Hiroshi Hatake <[email protected]>
WalkthroughThe staging-release GitHub Actions workflow now splits the release process: 4.0 releases are created as non-latest, while 4.1 releases are created as latest. A new conditional gates the 4.1 path with startsWith(inputs.version, '4.1'). Shared settings remain identical aside from tag_name and make_latest. Changes
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 job
alt version starts with "4.1"
Job->>Rel: Create "4.1 and latest" release<br/>(make_latest=true, tag_name=4.1.x)
Rel-->>Job: Release created
else version starts with "4.0"
Job->>Rel: Create "4.0 - not latest" release<br/>(make_latest=false, tag_name=4.0.x)
Rel-->>Job: Release created
end
Job-->>GH: Job complete
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this 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 onlyCondition 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 outfluent/fluent-bit-docs
atmaster
.Confirm that the docs repo uses branch
4.0
for 4.0.x andmaster
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 consistencyGood 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 clarityWorks 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
@cosmo0920 let's ensure the target commitish is set like CodeRabbit says too |
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:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
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