Skip to content

fix: CI#161

Merged
rustatian merged 1 commit intomasterfrom
fix/panic-when-no-plugin
Mar 6, 2026
Merged

fix: CI#161
rustatian merged 1 commit intomasterfrom
fix/panic-when-no-plugin

Conversation

@rustatian
Copy link
Copy Markdown
Member

@rustatian rustatian commented Mar 6, 2026

Reason for This PR

  • Fix CI issues

Description of Changes

  • Fix codecov.
  • Fix golangci.

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]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Summary by CodeRabbit

  • Chores
    • Updated CI/CD pipeline to improve code coverage reporting workflow with enhanced artifact handling and summary generation filtering.
    • Modified linter configuration to adjust code style rule settings.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian self-assigned this Mar 6, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 20:15
@rustatian rustatian added the enhancement New feature or request label Mar 6, 2026
@rustatian rustatian changed the title chore: update CI fix: CI Mar 6, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
CI Workflow Metrics Processing
.github/workflows/linux.yml
Added separate checkout step and artifact download. Refactored coverage metrics generation to tail coverage files, filter lines with awk to remove repository prefixes from roadrunner metrics, and write to summary.txt before codecov upload.
Linter Configuration
.golangci.yml
Added revive linter rule configuration under linters settings with var-naming rule disabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop! The workflows now flow with grace,
Coverage filtered clean, metrics find their place,
Linter rules configured just right,
The CI pipeline shines so bright!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: update CI' is vague and overly generic, using non-descriptive language that does not convey meaningful information about the specific changes made. Use a more specific title that describes the actual changes, such as 'chore: update codecov configuration and disable revive var-naming rule' or 'chore: fix CI codecov and linter configuration'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required sections from the template, though the change descriptions are minimal. Key sections present: reason provided, changes listed, license accepted, and checklist completed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/panic-when-no-plugin

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

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.71%. Comparing base (daa0141) to head (102b1a8).
⚠️ Report is 2 commits behind head on master.

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.
📢 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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’s var-naming rule 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 awk before 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.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (2)
.github/workflows/linux.yml (1)

106-112: Derive the module prefix from go.mod instead 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 from go.mod so 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 the var-naming suppression more narrowly.

Disabling the rule here fixes CI, but it also stops revive from 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-scoped exclude pattern in the rule config, or output filtering via linters.exclusions.rules instead 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

📥 Commits

Reviewing files that changed from the base of the PR and between daa0141 and 102b1a8.

📒 Files selected for processing (2)
  • .github/workflows/linux.yml
  • .golangci.yml

@rustatian rustatian merged commit c71f4f6 into master Mar 6, 2026
13 checks passed
@rustatian rustatian deleted the fix/panic-when-no-plugin branch March 6, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants