Use release environment in release workflow#68
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe release workflow now runs on manual, pull request, push-to-main, and published release events. Shared config constants replace several string-based output and network type checks, and the lint/link checker configs were updated accordingly. ChangesRelease Workflow Update
Lint and Link-check Config
Config and Writer Constant Migration
Estimated code review effort: 4 (Complex) | ~45 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
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 @.github/workflows/release.yml:
- Around line 4-16: The new workflow triggers are currently ineffective because
the only job, goreleaser, still runs only for github.event_name == 'release'
with action 'published'. Update the workflow so workflow_dispatch, pull_request,
and push either have a job that can actually run on those events or adjust the
goreleaser job’s if condition to allow the intended non-release paths; use the
goreleaser job definition and its event guard as the main place to fix this.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 64544e2f-9611-4d2d-a5f9-c1fefe18bd89
📒 Files selected for processing (1)
.github/workflows/release.yml
Align the release workflow with mmdbinspect's: trigger on release: published (with workflow_dispatch/pull_request/push-to-main for CI), run the goreleaser job in the release deployment environment, scope contents: write to the job, and guard the job so it only runs for published releases.
09b4599 to
2cbe392
Compare
eb853b4 to
7ffd154
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@internal/config/config.go`:
- Around line 263-266: The default Parquet column definitions in
config.Network.Columns are using the type constants as the column Name, which
ties emitted headers to the constant values. Update the NetworkColumn entries in
the config setup to use explicit name literals instead of
NetworkColumnTypeStartInt/NetworkColumnTypeEndInt for Name, and verify the
defaults still match the previously expected Parquet headers so there is no
regression.
In `@internal/writer/parquet.go`:
- Around line 24-28: The parquet compression values are duplicated between the
writer and config, which can let validation and codec dispatch drift out of
sync. Update `internal/writer/parquet.go` to reuse the exported
`config.parquetCompression{None,Snappy,Gzip,Lz4,Zstd}` constants instead of
redeclaring `compressionNone` through `compressionZstd`, and make sure both the
allow-list and `getCompressionCodec` reference the shared config symbols.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e6a4b598-489a-4be8-bcc9-02bb69cc6760
📒 Files selected for processing (7)
.golangci.ymlinternal/config/config.gointernal/writer/csv.gointernal/writer/parquet.gointernal/writer/writer.golychee.tomlmmdbconvert.go
| config.Network.Columns = []NetworkColumn{ | ||
| {Name: "start_int", Type: "start_int"}, | ||
| {Name: "end_int", Type: "end_int"}, | ||
| {Name: NetworkColumnTypeStartInt, Type: NetworkColumnTypeStartInt}, | ||
| {Name: NetworkColumnTypeEndInt, Type: NetworkColumnTypeEndInt}, | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Default Parquet column Name reuses the type constant.
{Name: NetworkColumnTypeStartInt, Type: NetworkColumnTypeStartInt} sets the column name to the same string as its type ("start_int"/"end_int"). This couples the default column name to the type constant's value — if the type constants are ever renamed the emitted column headers change with them, which is easy to miss. The CSV default correctly uses a descriptive literal (Name: "network"). Prefer explicit name literals here too, and confirm these match the previously-emitted default Parquet column names (no accidental header regression).
♻️ Suggested change
case OutputFormatParquet:
// Parquet default: integer columns for query performance
config.Network.Columns = []NetworkColumn{
- {Name: NetworkColumnTypeStartInt, Type: NetworkColumnTypeStartInt},
- {Name: NetworkColumnTypeEndInt, Type: NetworkColumnTypeEndInt},
+ {Name: "start_int", Type: NetworkColumnTypeStartInt},
+ {Name: "end_int", Type: NetworkColumnTypeEndInt},
}📝 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.
| config.Network.Columns = []NetworkColumn{ | |
| {Name: "start_int", Type: "start_int"}, | |
| {Name: "end_int", Type: "end_int"}, | |
| {Name: NetworkColumnTypeStartInt, Type: NetworkColumnTypeStartInt}, | |
| {Name: NetworkColumnTypeEndInt, Type: NetworkColumnTypeEndInt}, | |
| } | |
| config.Network.Columns = []NetworkColumn{ | |
| {Name: "start_int", Type: NetworkColumnTypeStartInt}, | |
| {Name: "end_int", Type: NetworkColumnTypeEndInt}, | |
| } |
🤖 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 `@internal/config/config.go` around lines 263 - 266, The default Parquet column
definitions in config.Network.Columns are using the type constants as the column
Name, which ties emitted headers to the constant values. Update the
NetworkColumn entries in the config setup to use explicit name literals instead
of NetworkColumnTypeStartInt/NetworkColumnTypeEndInt for Name, and verify the
defaults still match the previously expected Parquet headers so there is no
regression.
7ffd154 to
7cde4e6
Compare
Align the release workflow with mmdbinspect's structure.
release: publishedinstead of pushes ofv*tags, and addworkflow_dispatch,pull_request, and push-to-maintriggers for CI.goreleaserjob in thereleasedeployment environment, so its deployment protection policy actually applies.contents: writeto the job rather than the whole workflow.if: github.event_name == 'release' && github.event.action == 'published'so it only runs for published releases.Summary by CodeRabbit