Skip to content

fix(release): develop to main - #477

Merged
bedatty merged 5 commits into
mainfrom
develop
Jun 22, 2026
Merged

fix(release): develop to main#477
bedatty merged 5 commits into
mainfrom
develop

Conversation

@bedatty

@bedatty bedatty commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
Lerian

GitHub Actions Shared Workflows


Description

Type of Change

  • feat: New workflow or new input/output/step in an existing workflow
  • fix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)
  • perf: Performance improvement (e.g. caching, parallelism, reduced steps)
  • refactor: Internal restructuring with no behavior change
  • docs: Documentation only (README, docs/, inline comments)
  • ci: Changes to self-CI (workflows under .github/workflows/ that run on this repo)
  • chore: Dependency bumps, config updates, maintenance
  • test: Adding or updating tests
  • BREAKING CHANGE: Callers must update their configuration after this PR

Breaking Changes

None.

Testing

  • YAML syntax validated locally
  • Triggered a real workflow run on a caller repository using @this-branch or the beta tag
  • Verified all existing inputs still work with default values
  • Confirmed no secrets or tokens are printed in logs
  • Checked that unrelated workflows are not affected

Caller repo / workflow run:

Related Issues

Closes #

Summary by CodeRabbit

  • Chores
    • Streamlined the Go release workflow for improved S3 upload processing.
    • Updated release workflow documentation to clarify environment-based deployment configurations.

@bedatty
bedatty requested a review from a team as a code owner June 22, 2026 17:35
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The s3_upload job in .github/workflows/go-release.yml is rewritten from a matrix-driven reusable workflow call to a self-contained inlined job. It performs sequential tag-to-environment detection, AWS OIDC role assumption via AWS_MIGRATIONS_ROLE_ARN, JSON parsing of inputs.s3_uploads, and per-entry file uploads with flatten/strip_prefix support. Documentation is updated to match.

Changes

Inline S3 Upload in Go Release Workflow

Layer / File(s) Summary
Job scaffolding and tag-to-environment detection
.github/workflows/go-release.yml
Replaces the uses: ./.github/workflows/s3-upload.yml matrix job with an inlined job definition. Adds a shell step mapping tag suffixes (-betadevelopment, -rcstaging, vX.Y.Zproduction) and halting when no environment matches.
AWS credentials and S3 upload logic
.github/workflows/go-release.yml
Inlines aws-actions/configure-aws-credentials using secrets.AWS_MIGRATIONS_ROLE_ARN via OIDC. Parses inputs.s3_uploads with jq, validates s3_bucket and file_pattern per entry, constructs destination paths with optional s3_prefix, and uploads with flatten/strip_prefix support. Fails if a file_pattern matches no files.
Documentation update
docs/go-release-workflow.md
Revises s3_uploads parameter description to reflect sequential single-job processing, adds AWS_MIGRATIONS_ROLE_ARN OIDC secret mapping requirement with us-east-2 region, and updates the Related section to note inline upload instead of a separate workflow call.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

documentation, workflow, golang, size/S

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'fix(release): develop to main' does not accurately describe the actual changes; it refers to the PR's merge direction rather than the technical changes made to the workflow. Revise the title to reflect the actual changes, such as 'fix(release): inline S3 uploads and tighten tag validation' or similar to indicate the refactoring and security improvements.
Description check ⚠️ Warning The description section is completely empty; only the template structure is present with no actual summary of what the PR does or why these changes were made. Fill in the Description section with a clear summary of the workflow refactoring (S3 uploads inlined, reusable workflow matrix removed) and tag validation hardening, and complete relevant testing checkboxes with validation details.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Comment @coderabbitai help to get the list of available commands and usage tips.

@lerian-studio lerian-studio added size/S PR changes 50–199 lines documentation Improvements or additions to documentation workflow Changes to one or more reusable workflow files golang Changes to Go-related workflows labels Jun 22, 2026
@lerian-studio

lerian-studio commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🔍 Lint Analysis

Check Files Scanned Status
YAML Lint 1 file(s) ✅ success
Action Lint 1 file(s) ✅ success
Pinned Actions 1 file(s) ✅ success
Markdown Link Check 1 file(s) ✅ success
Spelling Check 2 file(s) ✅ success
Shell Check 1 file(s) ✅ success
README Check 1 file(s) ✅ success
Composite Schema no changes ⏭️ skipped
Deployment Matrix no changes ⏭️ skipped

🔍 View full scan logs

@lerian-studio

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ❌ failure no

🔍 View workflow run

@lerian-studio

lerian-studio commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🛡️ CodeQL Analysis Results

Languages analyzed: actions

✅ No security issues found.


🔍 View full scan logs | 🛡️ Security tab

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/go-release-workflow.md`:
- Around line 130-132: The documentation for the `s3_uploads` parameter in the
go-release-workflow.md file currently describes `strip_prefix` without
clarifying its dependency on the `flatten` setting. Update the `strip_prefix`
description to explicitly state that this parameter is only honored when
`flatten=false`, and that when `flatten=true` (the default), the `strip_prefix`
parameter is ignored because files are already being flattened. This
clarification should prevent users from expecting `strip_prefix` to work with
the default flatten behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8ce63081-ffdf-4d24-81ce-e15f13640292

📥 Commits

Reviewing files that changed from the base of the PR and between 6b3d20a and a68be6b.

📒 Files selected for processing (2)
  • .github/workflows/go-release.yml
  • docs/go-release-workflow.md

Comment on lines +130 to +132
Set `s3_uploads` to a JSON array to upload files (e.g. SQL migrations) to S3 on tag push, after `build` succeeds. All entries are processed sequentially inside a single `s3_upload` job (this avoids a GitHub Actions limitation where a `matrix` over a reusable-workflow `uses:` call is not instantiated in a nested reusable-workflow context), independent of the gitops update (it reads repo files, not build artifacts). Per-entry keys: `s3_bucket` (required), `file_pattern` (required), `s3_prefix` (optional), `strip_prefix` (optional — removes that prefix from the source path so keys land under `s3_prefix` directly), and `flatten` (optional, defaults to `true`; set `false` to preserve the directory structure). The target environment folder is auto-detected from the tag (`-beta` → development, `-rc` → staging, `vX.Y.Z` → production).

All entries share the `AWS_MIGRATIONS_ROLE_ARN` secret (forwarded to `s3-upload.yml`'s `AWS_ROLE_ARN`); map it explicitly in the caller.
The job assumes the `AWS_MIGRATIONS_ROLE_ARN` secret via OIDC (region `us-east-2`); map it explicitly in the caller.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify strip_prefix behavior.

The current wording implies strip_prefix always strips the source path and lands keys under s3_prefix directly. In the implementation, it is only honored when flatten=false; otherwise the upload is flattened and strip_prefix is ignored.

Suggested wording
- `strip_prefix` (optional — removes that prefix from the source path so keys land under `s3_prefix` directly)
+ `strip_prefix` (optional — used when `flatten=false`; removes that prefix before preserving the remaining directory structure under `s3_prefix`)
📝 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
Set `s3_uploads` to a JSON array to upload files (e.g. SQL migrations) to S3 on tag push, after `build` succeeds. All entries are processed sequentially inside a single `s3_upload` job (this avoids a GitHub Actions limitation where a `matrix` over a reusable-workflow `uses:` call is not instantiated in a nested reusable-workflow context), independent of the gitops update (it reads repo files, not build artifacts). Per-entry keys: `s3_bucket` (required), `file_pattern` (required), `s3_prefix` (optional), `strip_prefix` (optional — removes that prefix from the source path so keys land under `s3_prefix` directly), and `flatten` (optional, defaults to `true`; set `false` to preserve the directory structure). The target environment folder is auto-detected from the tag (`-beta` → development, `-rc` → staging, `vX.Y.Z` → production).
All entries share the `AWS_MIGRATIONS_ROLE_ARN` secret (forwarded to `s3-upload.yml`'s `AWS_ROLE_ARN`); map it explicitly in the caller.
The job assumes the `AWS_MIGRATIONS_ROLE_ARN` secret via OIDC (region `us-east-2`); map it explicitly in the caller.
Set `s3_uploads` to a JSON array to upload files (e.g. SQL migrations) to S3 on tag push, after `build` succeeds. All entries are processed sequentially inside a single `s3_upload` job (this avoids a GitHub Actions limitation where a `matrix` over a reusable-workflow `uses:` call is not instantiated in a nested reusable-workflow context), independent of the gitops update (it reads repo files, not build artifacts). Per-entry keys: `s3_bucket` (required), `file_pattern` (required), `s3_prefix` (optional), `strip_prefix` (optional — used when `flatten=false`; removes that prefix before preserving the remaining directory structure under `s3_prefix`), and `flatten` (optional, defaults to `true`; set `false` to preserve the directory structure). The target environment folder is auto-detected from the tag (`-beta` → development, `-rc` → staging, `vX.Y.Z` → production).
The job assumes the `AWS_MIGRATIONS_ROLE_ARN` secret via OIDC (region `us-east-2`); map it explicitly in the caller.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/go-release-workflow.md` around lines 130 - 132, The documentation for
the `s3_uploads` parameter in the go-release-workflow.md file currently
describes `strip_prefix` without clarifying its dependency on the `flatten`
setting. Update the `strip_prefix` description to explicitly state that this
parameter is only honored when `flatten=false`, and that when `flatten=true`
(the default), the `strip_prefix` parameter is ignored because files are already
being flattened. This clarification should prevent users from expecting
`strip_prefix` to work with the default flatten behavior.

@bedatty
bedatty merged commit ae858b4 into main Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation golang Changes to Go-related workflows size/S PR changes 50–199 lines workflow Changes to one or more reusable workflow files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants