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

Copy link
Member

Choose a reason for hiding this comment

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

I guess this should be moved to the metrics package

@@ -741,23 +742,23 @@ func (r *responseWriterWithInvocationsCheck) WriteHeader(statusCode int) {
}

type mockReporter struct {
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't be the metrics package a better place for this?

@@ -67,35 +63,30 @@ var (
// go.opencensus.io/tag/validate.go. Currently those restrictions are:
// - length between 1 and 255 inclusive
// - characters are printable US-ASCII
triggerFilterTypeKey = tag.MustNewKey(eventingmetrics.LabelFilterType)
triggerFilterTypeKey = tag.MustNewKey(LabelFilterType)
Copy link
Member

Choose a reason for hiding this comment

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

why do you keep broker/trigger specific vars in this package?

Copy link

knative-prow bot commented Aug 12, 2024

@Leo6Leo: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
unit-tests_eventing_main 8a22abb link true /test unit-tests
reconciler-tests_eventing_main 8a22abb link true /test reconciler-tests
conformance-tests_eventing_main 8a22abb link true /test conformance-tests
upgrade-tests_eventing_main 8a22abb link true /test upgrade-tests

Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

None yet

4 participants