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

Lineage constructor to accept clients instead of creating them #8399

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

aliok
Copy link
Member

@aliok aliok commented Jan 8, 2025

Fixes #

Proposed Changes

  • Lineage constructor to accept clients instead of creating them
  • Motivation
    • Otherwise it is impossible to test the callers of the lineage package
    • Now, I can pass fake clients and essentially mock the lineage package

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

:page_facing_up: "Action required" for the callers of the `knative.dev/eventing/pkg/graph` package. The constructor that has previously accepted a `rest.RestConfig` is now accepting clients (Kubernetes clients) directly instead of creating them in the package.

Docs

Signed-off-by: Ali Ok <aliok@redhat.com>
@aliok aliok requested review from pierDipi and Cali0707 January 8, 2025 06:03
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.

Project coverage is 64.22%. Comparing base (52792ea) to head (3f172cf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/graph/constructor.go 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8399      +/-   ##
==========================================
+ Coverage   64.19%   64.22%   +0.02%     
==========================================
  Files         388      388              
  Lines       23310    23302       -8     
==========================================
  Hits        14965    14965              
+ Misses       7550     7542       -8     
  Partials      795      795              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pierDipi pierDipi 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 knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2025
Copy link

knative-prow bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, pierDipi

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 merged commit 81a37ff into knative:main Jan 8, 2025
36 checks passed
@aliok aliok deleted the 2025-01-08-pass-client-to-lineage branch January 8, 2025 07:07
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. 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.

2 participants