Skip to content

Conversation

milldr
Copy link
Member

@milldr milldr commented Jun 6, 2025

what

  • Optionally create a prerelease from a feature branch if PR have release/feature label
  • Release created on PR synchronization

why

  • Prereleases can be used to publish a feature

references

Summary by CodeRabbit

  • Chores
    • Updated automated workflow to run release jobs on pull requests labeled with "release/feature".
    • Added a new label "release/feature" for managing feature releases.
    • Added a prerelease step and environment configuration to the release process.
    • Introduced a new deployment environment named "demo" allowing deployment from all branches.

Copy link

mergify bot commented Jun 6, 2025

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify bot added the needs-cloudposse Needs Cloud Posse assistance label Jun 6, 2025
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.77%. Comparing base (096072d) to head (d1e79bf).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1281      +/-   ##
==========================================
+ Coverage   50.66%   50.77%   +0.10%     
==========================================
  Files         237      237              
  Lines       25777    25777              
==========================================
+ Hits        13061    13089      +28     
+ Misses      11085    11052      -33     
- Partials     1631     1636       +5     
Flag Coverage Δ
unittests 50.77% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jun 6, 2025
@github-actions github-actions bot added size/s and removed size/xs labels Jun 6, 2025
@goruha goruha marked this pull request as ready for review June 9, 2025 09:50
@goruha goruha requested a review from a team as a code owner June 9, 2025 09:50
Copy link
Contributor

coderabbitai bot commented Jun 9, 2025

📝 Walkthrough

Walkthrough

The workflow file .github/workflows/test.yml was updated to expand the conditions under which the release job runs, now including specific pull request events. The workflow reference was switched to a different branch, and a prerelease input parameter was added and set to true. The publish input was changed to true, and an environment input was added.

Changes

File(s) Change Summary
.github/workflows/test.yml Expanded release job trigger to include pull requests with release/feature label; changed workflow reference branch; set publish: true; added prerelease: true and environment: feature-releases.
.github/settings.yml Added new GitHub label release/feature with color #d73a4a and description "Create release from this PR."; added new environment demo with deployment branch policy allowing all branches.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub
    participant Workflow
    participant ReleaseJob

    GitHub->>Workflow: push event OR pull_request with release/feature label
    Workflow->>ReleaseJob: Trigger with prerelease: true, publish: true, format: binary
    ReleaseJob-->>Workflow: Execute release logic (fetch tags only)
Loading

Assessment against linked issues

Objective Addressed Explanation
Generate a RC for this feature (DEV-3331)

Suggested labels

minor

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch DEV-3331/feature-branch-rc-2
  • Post Copyable Unit Tests in Comment

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

Documentation and Community

  • 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
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 (3)
.github/workflows/test.yml (3)

531-531: Remove trailing whitespace
This line has trailing spaces, which will cause a YAML lint error.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)


539-539: Limit secret scope
Using secrets: inherit exposes all repository secrets to the reusable workflow. For better security and auditability, consider passing only the specific secrets required by this job.


540-542: Remove extra blank lines
There are multiple blank lines here; reduce to a single blank line to satisfy YAML lint rules.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 541-541: too many blank lines

(3 > 0) (empty-lines)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9afebc1 and 1916c1b.

📒 Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/test.yml

[error] 531-531: trailing spaces

(trailing-spaces)


[warning] 541-541: too many blank lines

(3 > 0) (empty-lines)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Analyze (go)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Summary
🔇 Additional comments (2)
.github/workflows/test.yml (2)

534-534: Confirm reusable workflow branch
The uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@autorelease-fetch-tags-only reference was updated. Verify that the autorelease-fetch-tags-only branch or tag exists and is up-to-date in the cloudposse/.github repo to avoid broken workflow runs.


537-537: Enable prerelease flag
Adding prerelease: true is a useful enhancement. Please confirm the upstream reusable workflow supports this input and that any consumers of the release artifacts handle prerelease versions as expected.

Copy link
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

♻️ Duplicate comments (1)
.github/workflows/test.yml (1)

530-533: Ensure workflow triggers on label addition events
The if condition checks PR labels, but on: pull_request is limited to opened, synchronize, and reopened. Label additions won’t retrigger the job.

Consider adding types: [labeled] under on: pull_request or switching to pull_request_target with types: [labeled].

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (2)
.github/workflows/test.yml (2)

531-531: Remove trailing whitespace
Line 531 has trailing spaces.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)


540-543: Remove extra blank lines and trailing spaces
There are multiple blank lines (and trailing spaces) before the end of the job definition.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 540-540: trailing spaces

(trailing-spaces)


[warning] 543-543: too many blank lines

(3 > 0) (empty-lines)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1916c1b and d9ef29e.

📒 Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/test.yml

[error] 531-531: trailing spaces

(trailing-spaces)


[error] 540-540: trailing spaces

(trailing-spaces)


[warning] 543-543: too many blank lines

(3 > 0) (empty-lines)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary

@goruha goruha added the no-release Do not create a new release (wait for additional code changes) label Jun 13, 2025
Copy link
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: 0

♻️ Duplicate comments (2)
.github/workflows/test.yml (2)

535-536: 🛠️ Refactor suggestion

Make publish and prerelease flags conditional

Hardcoding both flags triggers prereleases on all pushes (e.g., main or release branches). Restrict publishing to pushes and prereleasing to PRs:

-with:
-  publish: true
-  prerelease: true
+with:
+  publish: ${{ github.event_name == 'push' }}
+  prerelease: ${{ github.event_name == 'pull_request' }}

530-532: 🛠️ Refactor suggestion

Ensure release job triggers on label additions

The workflow only listens to pull_request events for opened/synchronize/reopened. Adding release/feature later won’t retrigger the job. Include labeled in on.pull_request.types:

on:
  pull_request:
-    types: [opened, synchronize, reopened]
+    types: [opened, synchronize, reopened, labeled]
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (4)
.github/workflows/test.yml (4)

531-531: Remove trailing spaces

Lint flagged trailing whitespace here. Please trim the line.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)


538-538: Scope environment input by trigger

environment: 'feature-releases' applies to every run. If full releases should use a different environment (e.g., production), consider:

environment: ${{ github.event_name == 'pull_request' && 'feature-releases' || 'production' }}

533-533: Pin the external workflow reference

Using @main can introduce breaking changes when that repo updates. Pin to a specific tag or SHA for reproducible releases.


542-542: Eliminate extra blank lines

There are several consecutive blank lines here. Collapse to a single blank line for clarity.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 542-542: too many blank lines

(3 > 0) (empty-lines)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43e62dc and 34d56c3.

📒 Files selected for processing (2)
  • .github/settings.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/settings.yml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/test.yml

[error] 531-531: trailing spaces

(trailing-spaces)


[warning] 542-542: too many blank lines

(3 > 0) (empty-lines)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Summary

@goruha goruha temporarily deployed to feature-releases June 13, 2025 17:46 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 17:46 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 18:14 — with GitHub Actions Inactive
Copy link
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: 0

🧹 Nitpick comments (2)
.github/settings.yml (2)

14-14: Remove trailing whitespace
Trailing spaces on blank lines can cause YAML lint failures. Please delete the extra spaces on line 14.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 14-14: trailing spaces

(trailing-spaces)


25-25: Remove extra blank line
There’s an extra blank line after the labels section which triggers a YAML lint warning. You can collapse to a single blank line between sections.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 25-25: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 791324d and 1fcf520.

📒 Files selected for processing (1)
  • .github/settings.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/settings.yml

[error] 14-14: trailing spaces

(trailing-spaces)


[warning] 25-25: too many blank lines

(1 > 0) (empty-lines)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Analyze (go)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Summary
🔇 Additional comments (2)
.github/settings.yml (2)

15-20: Confirm wildcard branch policy
You've introduced a demo environment with a "**/*" branch policy. Verify that allowing deployments from all branches is intentional and doesn’t expose unintended branches.


21-24: Add release/feature label
The new release/feature label is correctly defined to trigger prereleases from feature branches and aligns with the workflow changes.

@goruha goruha had a problem deploying to feature-releases June 13, 2025 19:02 — with GitHub Actions Failure
Copy link
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: 0

♻️ Duplicate comments (2)
.github/workflows/test.yml (2)

3-4: Trigger on label addition
Labeling a PR won’t rerun this workflow since pull_request.types excludes labeled.
Add the labeled type:

 on:
   pull_request:
-    types: [opened, synchronize, reopened]
+    types: [opened, synchronize, reopened, labeled]

535-536: Make publish/prerelease conditional
Hardcoding both to true will publish prereleases on push events.
Use expressions instead:

-      publish: true
-      prerelease: true
+      publish: ${{ github.event_name == 'push' }}
+      prerelease: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'release/feature') }}
🧹 Nitpick comments (2)
.github/workflows/test.yml (2)

531-531: Trim trailing whitespace
YAML lint flags a trailing space here.

-if: |␣
+if: |
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 531-531: trailing spaces

(trailing-spaces)


538-538: Conditional environment
All releases (even prod pushes) target feature-releases. Consider setting environment based on event or label to keep prod and feature channels separate.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1fcf520 and 949a865.

📒 Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/test.yml

[error] 531-531: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary

@goruha goruha temporarily deployed to feature-releases June 13, 2025 19:40 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 19:40 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 20:08 — with GitHub Actions Inactive
@goruha goruha enabled auto-merge (squash) June 13, 2025 20:28
@goruha goruha temporarily deployed to feature-releases June 13, 2025 20:45 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 20:46 — with GitHub Actions Inactive
@goruha goruha temporarily deployed to feature-releases June 13, 2025 21:13 — with GitHub Actions Inactive
@goruha goruha merged commit 80f5f5c into main Jun 13, 2025
55 checks passed
@goruha goruha deleted the DEV-3331/feature-branch-rc-2 branch June 13, 2025 21:28
@mergify mergify bot removed the needs-cloudposse Needs Cloud Posse assistance label Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system no-release Do not create a new release (wait for additional code changes) release/feature Create release from this PR size/s Small size PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants