-
Notifications
You must be signed in to change notification settings - Fork 597
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
feat: add constructor for full event lineage graph #7921
Conversation
Signed-off-by: Calum Murray <[email protected]>
/cc @pierDipi |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707 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 |
This is WIP because I want feedback on the approach before adding unit tests |
Signed-off-by: Calum Murray <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7921 +/- ##
==========================================
- Coverage 67.87% 67.04% -0.83%
==========================================
Files 368 368
Lines 17551 17777 +226
==========================================
+ Hits 11912 11918 +6
- Misses 4894 5113 +219
- Partials 745 746 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
|
||
return g, nil | ||
} | ||
|
||
func (g *Graph) AddBroker(broker eventingv1.Broker) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we actually embed the full broker resource in the graph here? Or make it a config option?
Because, for example in the Backstage backend, if I only have references, I will need to fetch the brokers again. But, we have the full resource here fetched anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Cali0707 this is done, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the resources are all added with type interface{}
to each vertex
Kind of irrelevant for this PR, but it would be super nice if we have a
|
/cc @aliok |
Yeah 100%, I thought about this too but I wasn't sure how to show a vertex with an arbitrary number of edges using just strings... |
I added stringer impls for types now. It is ok-ish. Example:
|
Say we have an EventType: kind: EventType
metadata:
name: test-event-type
namespace: default
spec:
reference:
apiVersion: eventing.knative.dev/v1
kind: Broker
name: test-broker Currently the graph is constructed in a way that there is an edge from ET to Broker. I think it should be the other way around. Events of EventType is coming out of broker. cc @pierDipi |
for 3 entries, it was creating an array of 6 Signed-off-by: Ali Ok <[email protected]>
Signed-off-by: Calum Murray <[email protected]>
Signed-off-by: Ali Ok <[email protected]>
Signed-off-by: Ali Ok <[email protected]>
Signed-off-by: Ali Ok <[email protected]>
192021c
to
d60a069
Compare
@aliok do you think we can merge this PR and then make any required changes on follow up PRs? |
/test reconciler-tests |
I think we can merge this one. I can make changes later on |
/test reconciler-tests |
/retest-required |
/lgtm Holding for others to review if necessary |
/unhold |
Fixes #7694
Proposed Changes