Skip to content

Create generic statsReporter in metrics package#8084

Closed
Leo6Leo wants to merge 12 commits intoknative:mainfrom
Leo6Leo:rewrite-stats-reporter
Closed

Create generic statsReporter in metrics package#8084
Leo6Leo wants to merge 12 commits intoknative:mainfrom
Leo6Leo:rewrite-stats-reporter

Conversation

@Leo6Leo
Copy link
Copy Markdown
Member

@Leo6Leo Leo6Leo commented Jul 8, 2024

Proposed Changes

  • Create the generic StatsReporter in the metrics package
  • Merge all the existing statsReporter to use this generic statsreporter
  • Modify the corresponding unit tests

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note


Docs

@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Jul 8, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow knative-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2024
@knative-prow knative-prow Bot requested review from aslom and pierDipi July 8, 2024 22:25
@knative-prow knative-prow Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 8, 2024
…ariables and methods for broker filter's stat_reporter - 1
@Cali0707 Cali0707 self-requested a review July 9, 2024 13:06
Comment thread pkg/metrics/stats_reporter.go Outdated
Comment thread pkg/metrics/stats_reporter.go Outdated
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 11, 2024
@Cali0707
Copy link
Copy Markdown
Member

@Leo6Leo can you rebase?

@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2024
@knative-prow knative-prow Bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2024
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Aug 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leo6Leo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 9, 2024
@Leo6Leo Leo6Leo marked this pull request as ready for review August 9, 2024 19:38
@knative-prow knative-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 9, 2024
@Leo6Leo
Copy link
Copy Markdown
Member Author

Leo6Leo commented Aug 9, 2024

/cc @creydr

I re-write the statsReport to make it more generic and moved it to the metrics package by following the suggestions you left here.

Please let me know if this is on the right track, then I will proceed changing the statsReporter for channel, broker ingress... to use the new generic statsReporter.

@knative-prow knative-prow Bot requested a review from creydr August 9, 2024 20:53
@creydr
Copy link
Copy Markdown
Member

creydr commented Aug 12, 2024

@Leo6Leo can you check on the failing tests?

Comment thread pkg/broker/filter/stats_reporter_test.go
Comment thread pkg/broker/filter/filter_handler_test.go
Comment thread pkg/metrics/stats_reporter.go Outdated
@Leo6Leo Leo6Leo requested a review from creydr August 14, 2024 09:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.74%. Comparing base (71d5d5f) to head (e1aa68a).
Report is 186 commits behind head on main.

Files with missing lines Patch % Lines
pkg/metrics/stats_reporter.go 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8084      +/-   ##
==========================================
+ Coverage   67.71%   67.74%   +0.03%     
==========================================
  Files         370      371       +1     
  Lines       17946    17965      +19     
==========================================
+ Hits        12152    12171      +19     
  Misses       5020     5020              
  Partials      774      774              

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

@github-actions
Copy link
Copy Markdown
Contributor

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.

@github-actions github-actions Bot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 14, 2024
@Leo6Leo
Copy link
Copy Markdown
Member Author

Leo6Leo commented Jan 19, 2025

/remove-lifecycle stale

@Leo6Leo
Copy link
Copy Markdown
Member Author

Leo6Leo commented Mar 10, 2025

I will pick this PR up sometime next week. But if anyone is interested in this issue, feel free to work on it!

@matzew
Copy link
Copy Markdown
Member

matzew commented May 22, 2025

@Leo6Leo
should we close this?

@Leo6Leo Leo6Leo closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants