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 a new ListableTracker ctor taking a tracker.Interface #5651

Merged
merged 1 commit into from
Aug 21, 2021

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Aug 20, 2021

I noticed in a few places downstream that reconcilers were creating multiple trackers, which seems superfluous. As part of examining the way we use the tracker, I'm experimenting with changing this to just take a tracker.

/kind cleanup

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

NewListableTracker is deprecated, use NewListableTrackerFromTracker instead.

Docs

@knative-prow-robot knative-prow-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Aug 20, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 20, 2021
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 20, 2021
@mattmoor
Copy link
Member Author

mattmoor commented Aug 20, 2021

PSA: I'm opening this to survey what breaks, I don't plan to check this in as-is.

This is in a similar vein to: knative/pkg#2220

EDIT: I've updated this to be in a form we can check in (deprecate the old method)

@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #5651 (5f54e95) into main (3e584ed) will decrease coverage by 0.01%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5651      +/-   ##
==========================================
- Coverage   82.73%   82.71%   -0.02%     
==========================================
  Files         200      200              
  Lines        6266     6267       +1     
==========================================
  Hits         5184     5184              
- Misses        750      751       +1     
  Partials      332      332              
Impacted Files Coverage Δ
pkg/duck/listable.go 81.94% <50.00%> (-1.16%) ⬇️
pkg/reconciler/broker/controller.go 88.88% <100.00%> (ø)
pkg/reconciler/broker/trigger/controller.go 92.10% <100.00%> (ø)
pkg/reconciler/channel/controller.go 100.00% <100.00%> (ø)
pkg/reconciler/parallel/controller.go 100.00% <100.00%> (ø)
pkg/reconciler/sequence/controller.go 100.00% <100.00%> (ø)
pkg/reconciler/subscription/controller.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e584ed...5f54e95. Read the comment docs.

I noticed in a few places downstream that reconcilers were creating multiple trackers, which seems superfluous. As part of examining the way we use the tracker, I'm experimenting with changing this to just take a tracker.

/kind cleanup
@mattmoor mattmoor force-pushed the new-listable-tracker branch from 8a7c5bf to 5f54e95 Compare August 20, 2021 23:06
@mattmoor mattmoor changed the title [WIP] Have the listable tracker take a tracker. Create a new ListableTracker ctor taking a tracker.Interface Aug 20, 2021
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 20, 2021
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/duck/listable.go 88.7% 87.0% -1.6

@mattmoor
Copy link
Member Author

/assign @n3wscott

Copy link
Contributor

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 21, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, n3wscott

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2021
@knative-prow-robot knative-prow-robot merged commit 128a666 into knative:main Aug 21, 2021
@mattmoor mattmoor deleted the new-listable-tracker branch August 21, 2021 20:55
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. cla: yes Indicates the PR's author has signed the CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants