-
Notifications
You must be signed in to change notification settings - Fork 16
Correcting the dependency order for backend entity enricher #93
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #93 +/- ##
=========================================
Coverage 68.94% 68.94%
Complexity 820 820
=========================================
Files 84 84
Lines 3475 3475
Branches 367 367
=========================================
Hits 2396 2396
Misses 935 935
Partials 144 144
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
@kotharironak I wonder how this did not fail and more so, how can we prevent this kind of things in the future. |
unit tests :) That actually verify expectations |
But isn't this a dependency issue? Shouldn't this appear on compilation? I am just wondering. In any case if this is because of lack of unit tests I would quickly add one before merge it. |
...-trace-enricher/hypertrace-trace-enricher/src/main/resources/configs/common/application.conf
Show resolved
Hide resolved
| port = ${?ENTITY_SERVICE_PORT_CONFIG} | ||
| } | ||
| dependencies = ["DefaultServiceEntityEnricher"] | ||
| dependencies = ["DefaultServiceEntityEnricher", "EndpointEnricher"] |
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.
I wonder why do we have all this dependency information as part of config. Do we need to frequently change this order based on environment etc?
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.
I don't think we change this based on the environment but we want to be able to enable/disable a given enricher.
Currently, it is config driven dependency so, I think, it's hard to check at compilation time. But, yes, some sort of test case help here. I will create a follow-up PR for this. |
While working on the issue - hypertrace/hypertrace#128, I have observed the following topology sort for enrichers.
As we can see from the code - https://github.com/hypertrace/hypertrace-trace-enricher/blob/435d21caab170c5b8d207785204b61839089a599/hypertrace-trace-enricher-impl/src/main/java/org/hypertrace/traceenricher/enrichment/enrichers/BackendEntityEnricher.java#L112 - that backend entity enricher depended on attribute
ApiAttribute.API_ATTRIBUTE_IDin EndpointEnricher. So, adding the dependency.