Skip to content

chore: move coverage report copying logic to makefile target#54

Merged
nilushancosta merged 1 commit intoopenchoreo:mainfrom
nilushancosta:observability
Mar 18, 2026
Merged

chore: move coverage report copying logic to makefile target#54
nilushancosta merged 1 commit intoopenchoreo:mainfrom
nilushancosta:observability

Conversation

@nilushancosta
Copy link
Copy Markdown
Contributor

@nilushancosta nilushancosta commented Mar 18, 2026

Purpose

openchoreo/openchoreo#2755
Update the unit-test target it the Makefile to copy the generated code coverage report to the repository root

Goals

Make the code coverage publishing workflow generic so it just needs to run make unit-test

Approach

Updated the Makefiles' unit-test target to copy the coverage report to the repository root

Summary by CodeRabbit

  • Chores
    • Updated Helm chart versions across observability modules
    • Simplified CI/PR workflow coverage handling
    • Enhanced build configuration for improved artifact management

Signed-off-by: Nilushan Costa <nilushan@wso2.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

The PR removes coverage file handling steps from CI and PR workflows, shifting responsibility to individual module Makefiles that now generate module-prefixed coverage artifacts in the parent directory. Additionally, Helm chart versions are bumped across three observability modules.

Changes

Cohort / File(s) Summary
Workflow Coverage Cleanup
.github/workflows/ci.yaml, .github/workflows/pr.yaml
Removed steps that copied per-module coverage.out files and cleanup steps that deleted coverage artifacts across modules.
Module Makefile Coverage Handling
observability-logs-openobserve/Makefile, observability-metrics-prometheus/Makefile, observability-tracing-openobserve/Makefile
Added MODULE_NAME variable and updated unit-test target to move coverage.out to parent directory as $(MODULE_NAME)-coverage.out.
Helm Chart Version Bumps
observability-logs-openobserve/helm/Chart.yaml, observability-metrics-prometheus/helm/Chart.yaml, observability-tracing-openobserve/helm/Chart.yaml
Updated version and appVersion fields (0.3.9→0.3.10, 0.2.4→0.2.5, 0.1.4→0.1.5).
README Documentation Updates
observability-logs-openobserve/README.md, observability-metrics-prometheus/README.md, observability-tracing-openobserve/README.md
Updated Helm chart version references in installation instructions to match Chart.yaml bumps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • LakshanSS
  • akila-i

Poem

🐰 Coverage flows from workflows to Makefiles, clean and bright,
Per-module artifacts dance to the parent directory's light,
Version bumps echo through helm charts near and far,
Observability modules shine like a coordinated star! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving coverage report copying logic from CI/PR workflows to Makefile targets across multiple modules.
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 unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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 (1)
observability-tracing-openobserve/Makefile (1)

17-19: Consider handling the case where no coverage file is generated.

If there are no test files or go test fails to produce coverage.out, the mv command will fail. While this surfaces configuration issues, you may want to make it more resilient:

💡 Optional: Add existence check
 unit-test:
 	go test -coverprofile=coverage.out ./...
-	mv coverage.out ../$(MODULE_NAME)-coverage.out
+	[ -f coverage.out ] && mv coverage.out ../$(MODULE_NAME)-coverage.out || true

This is optional since failing loudly when coverage is expected but missing can also be a valid design choice.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@observability-tracing-openobserve/Makefile` around lines 17 - 19, The
Makefile unit-test target currently runs "go test -coverprofile=coverage.out
./..." then unconditionally moves coverage.out with "mv coverage.out
../$(MODULE_NAME)-coverage.out", which will fail if no coverage file is
produced; update the unit-test recipe (the target named unit-test) to check for
the existence and/or success before moving—e.g., only run the mv when
coverage.out exists (or check the exit status of go test) so the move is skipped
(or a clear message emitted) when coverage.out is not generated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@observability-tracing-openobserve/Makefile`:
- Around line 17-19: The Makefile unit-test target currently runs "go test
-coverprofile=coverage.out ./..." then unconditionally moves coverage.out with
"mv coverage.out ../$(MODULE_NAME)-coverage.out", which will fail if no coverage
file is produced; update the unit-test recipe (the target named unit-test) to
check for the existence and/or success before moving—e.g., only run the mv when
coverage.out exists (or check the exit status of go test) so the move is skipped
(or a clear message emitted) when coverage.out is not generated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bc632759-f966-44c4-98d7-9bd5c27a770a

📥 Commits

Reviewing files that changed from the base of the PR and between f66fa02 and 2cababc.

📒 Files selected for processing (11)
  • .github/workflows/ci.yaml
  • .github/workflows/pr.yaml
  • observability-logs-openobserve/Makefile
  • observability-logs-openobserve/README.md
  • observability-logs-openobserve/helm/Chart.yaml
  • observability-metrics-prometheus/Makefile
  • observability-metrics-prometheus/README.md
  • observability-metrics-prometheus/helm/Chart.yaml
  • observability-tracing-openobserve/Makefile
  • observability-tracing-openobserve/README.md
  • observability-tracing-openobserve/helm/Chart.yaml
💤 Files with no reviewable changes (2)
  • .github/workflows/ci.yaml
  • .github/workflows/pr.yaml

@nilushancosta nilushancosta merged commit 0c831c4 into openchoreo:main Mar 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants