Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create generic statsReporter in metrics package #8084

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Leo6Leo
Copy link
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

Copy link

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
pkg/metrics/stats_reporter.go Outdated Show resolved Hide resolved
pkg/metrics/stats_reporter.go Outdated Show resolved Hide resolved
@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
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
Copy link

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

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
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
Member

creydr commented Aug 12, 2024

@Leo6Leo can you check on the failing tests?

pkg/broker/filter/stats_reporter_test.go Outdated Show resolved Hide resolved
pkg/broker/filter/filter_handler_test.go Outdated Show resolved Hide resolved
pkg/metrics/stats_reporter.go Outdated Show resolved Hide resolved
@Leo6Leo Leo6Leo requested a review from creydr August 14, 2024 09:11
Copy link

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

Copy link

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

4 participants