Conversation
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
📝 WalkthroughWalkthroughThe pull request updates the GitHub Actions Linux CI workflow to refactor coverage metrics processing with improved artifact handling and awk-based filtering, and disables the var-naming linter rule in the Go golangci configuration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #161 +/- ##
===========================================
+ Coverage 0 65.71% +65.71%
===========================================
Files 0 3 +3
Lines 0 385 +385
===========================================
+ Hits 0 253 +253
- Misses 0 103 +103
- Partials 0 29 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CI configuration to resolve current pipeline failures by adjusting golangci-lint rules and improving how Go coverage artifacts are downloaded and post-processed before uploading to Codecov.
Changes:
- Disable
revive’svar-namingrule in golangci-lint to unblock linting. - Update the Linux workflow’s Codecov job to check out the repo, download the coverage artifact into a dedicated directory, and normalize coverage paths via
awkbefore uploading.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .golangci.yml | Disables revive var-naming rule under linters.settings to address golangci-lint failures. |
| .github/workflows/linux.yml | Fixes Codecov upload flow by downloading the coverage artifact to a known location and filtering/rewriting coverage profile paths before upload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/linux.yml (1)
106-112: Derive the module prefix fromgo.modinstead of hard-coding/v5.This filter now duplicates the module declaration from
go.mod:1. The next module-version bump or repo rename will silently strip every coverage row and upload a nearly empty report. Read the prefix fromgo.modso the workflow stays in sync automatically.♻️ Suggested change
- run: | echo 'mode: atomic' > summary.txt tail -q -n +2 coverage/*.out >> summary.txt - awk ' + module_prefix="$(awk '/^module / { print $2 "/" }' go.mod)" + awk -v module_prefix="$module_prefix" ' NR == 1 { print; next } - /^github\.com\/roadrunner-server\/metrics\/v5\// { - sub(/^github\.com\/roadrunner-server\/metrics\/v5\//, "", $0) + index($0, module_prefix) == 1 { + sub("^" module_prefix, "", $0) print } ' summary.txt > summary.filtered.txt mv summary.filtered.txt summary.txt🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux.yml around lines 106 - 112, The awk filter hard-codes the module path suffix "/v5" and will break on module version bumps; instead read the module prefix from go.mod (first line) into a shell variable and pass it into awk so the script strips that dynamic prefix. Update the workflow to: read/trim module name from go.mod (line 1), export or assign it as MODULE_PREFIX, then invoke awk on summary.txt using -v prefix="$MODULE_PREFIX" and replace the hard-coded /^github\.com\/roadrunner-server\/metrics\/v5\// and sub call with a pattern built from prefix so the output writes to summary.filtered.txt..golangci.yml (1)
57-60: Scope thevar-namingsuppression more narrowly.Disabling the rule here fixes CI, but it also stops
revivefrom catching new naming regressions anywhere in the repo. If this is only for a few legacy identifiers, use an inline directive (//revive:disable-line:var-naming), a path-scopedexcludepattern in the rule config, or output filtering vialinters.exclusions.rulesinstead of turning the rule off globally.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.golangci.yml around lines 57 - 60, The global disable of the revive rule "var-naming" in .golangci.yml is too broad; instead, restrict the suppression to only the legacy identifiers or files that need it by either adding an exclude pattern under the revive rule (e.g., add an "exclude: 'path/regex/for/legacy/.*'"" entry for the var-naming rule), using inline directives like "//revive:disable-line:var-naming" on the specific legacy declarations, or by adding a rules-level exclusion in "linters.exclusions.rules" that targets the exact files/identifiers; update the revive rules block to re-enable "var-naming" globally and apply one of these narrow-scoped exclusions referencing the "var-naming" rule name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/linux.yml:
- Around line 106-112: The awk filter hard-codes the module path suffix "/v5"
and will break on module version bumps; instead read the module prefix from
go.mod (first line) into a shell variable and pass it into awk so the script
strips that dynamic prefix. Update the workflow to: read/trim module name from
go.mod (line 1), export or assign it as MODULE_PREFIX, then invoke awk on
summary.txt using -v prefix="$MODULE_PREFIX" and replace the hard-coded
/^github\.com\/roadrunner-server\/metrics\/v5\// and sub call with a pattern
built from prefix so the output writes to summary.filtered.txt.
In @.golangci.yml:
- Around line 57-60: The global disable of the revive rule "var-naming" in
.golangci.yml is too broad; instead, restrict the suppression to only the legacy
identifiers or files that need it by either adding an exclude pattern under the
revive rule (e.g., add an "exclude: 'path/regex/for/legacy/.*'"" entry for the
var-naming rule), using inline directives like
"//revive:disable-line:var-naming" on the specific legacy declarations, or by
adding a rules-level exclusion in "linters.exclusions.rules" that targets the
exact files/identifiers; update the revive rules block to re-enable "var-naming"
globally and apply one of these narrow-scoped exclusions referencing the
"var-naming" rule name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 86a25159-f63f-450c-8dfc-7d5eada828ca
📒 Files selected for processing (2)
.github/workflows/linux.yml.golangci.yml
Reason for This PR
Description of Changes
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.][Reviewer TODO: Verify that these criteria are met. Request changes if not]git commit -s).CHANGELOG.md.Summary by CodeRabbit