-
Notifications
You must be signed in to change notification settings - Fork 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
feat(telemetry): Combine Telemetry hook to send heap event once #766
Conversation
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]>
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.
Thank you for the PR, @noklam. Great job! I appreciate the approach to merge the two classes into one to facilitate data exchange, and the integration tests are really useful. I mostly agree with the new logic; it's excellent that we can now send only one event! I left a small comment and would like to propose removing the before_command_run()
hook entirely. I believe it's not necessary, and all the logic can be placed inside the other two hooks with the same result. Is that correct?
) | ||
self.event_properties = enriched_properties | ||
if not self._sent: |
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 believe we don't need that check here. The logic should be that enriched_properties
should be sent in any case. It is our responsibility to ensure the event is not sent again in the after_command_run()
hook later.
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.
Yeah I think you are right, since we only have two hooks after_catalog_created
and after_command_run
that will send event, and this is the earliest one so in reality there shouldn't be case this is set True
.
Generally, the approach makes sense but I think it would be good to wait to switch to |
My opinion is that it would be better to proceed with current approach, but first completely remove the I think it's acceptable to lose information about failed runs for now because we are not currently analysing it properly. I believe it makes sense to implement a special flow for failed runs later, such as collecting error types and analysing them for some insights. |
@ankatiyar There may be conflicts between the two requirements:
|
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
I can't approve my own PR, but it looks good to me now :) |
As agreed, we have merged The current logic is as follows:
I attempted to fix the integration tests but was unsuccessful. After discussing with @noklam, I have moved the integration tests to a separate issue and PR (#771). Please re-review the PR. |
Signed-off-by: Dmitry Sorokin <[email protected]>
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.
LGTM! I think this partially resolves #709 too then!
Signed-off-by: Dmitry Sorokin <[email protected]>
…o-org#766) --------- Signed-off-by: Nok Lam Chan <[email protected]> Signed-off-by: Dmitry Sorokin <[email protected]> Signed-off-by: Dmitry Sorokin <[email protected]> Signed-off-by: Merel Theisen <[email protected]>
Description
Fix #730
Development notes
The test isn't quite working yet, as some test is passing when run individually but fail when I run in a batch. The change is quite big already so I want to get some review:
KedroTelemetryCLIHooks
andKedroTelemetryProjectHooks
are combined to avoid cross hook communication and make it possible to send event ONCE only by storing some intermediate states (handle entrypoint for bothkedro
command or justsession.run()
kedro-telemetry
back tokedro
then we can share the same starter project. It's a temporary structure as I don't think adding it to the currenttest_plugin.py
fits as the test is more high level.kedro-telemetry
: Spike to reduce redundant telemetry events #730 (comment)There are more detailed conversation internally for this approach.
Checklist
RELEASE.md
file