Skip to content

Commit

Permalink
feat(telemetry): Remove telemetry opt-out notifications (#792)
Browse files Browse the repository at this point in the history
* remove telemetry opt-out notifications

---------

Signed-off-by: Dmitry Sorokin <dmd40in@gmail.com>
  • Loading branch information
DimedS authored Jul 31, 2024
1 parent da66452 commit f6b934c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions kedro-telemetry/kedro_telemetry/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def before_command_run(

self._consent = _check_for_telemetry_consent(project_metadata.project_path)
if not self._consent:
self._opt_out_notification()
return

# get KedroCLI and its structure from actual project root
Expand Down Expand Up @@ -208,8 +207,6 @@ def after_context_created(self, context):

if self._consent is None:
self._consent = _check_for_telemetry_consent(context.project_path)
if not self._consent:
self._opt_out_notification()
self._project_path = context.project_path

@hook_impl
Expand All @@ -234,12 +231,6 @@ def after_catalog_created(self, catalog):

self._send_telemetry_heap_event("Kedro Project Statistics")

def _opt_out_notification(self):
logger.info(
"Kedro-Telemetry is installed, but you have opted out of "
"sharing usage analytics so none will be collected.",
)

def _send_telemetry_heap_event(self, event_name: str):
"""Hook implementation to send command run data to Heap"""

Expand Down
10 changes: 0 additions & 10 deletions kedro-telemetry/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ def test_before_command_run(self, mocker, fake_metadata, caplog):
in record.message
for record in caplog.records
)
assert not any(
"Kedro-Telemetry is installed, but you have opted out of "
"sharing usage analytics so none will be collected." in record.message
for record in caplog.records
)

def test_before_command_run_with_tools(self, mocker, fake_metadata):
mocker.patch(
Expand Down Expand Up @@ -302,11 +297,6 @@ def test_before_command_run_no_consent_given(self, mocker, fake_metadata, caplog
in record.message
for record in caplog.records
)
assert any(
"Kedro-Telemetry is installed, but you have opted out of "
"sharing usage analytics so none will be collected." in record.message
for record in caplog.records
)

def test_before_command_run_connection_error(self, mocker, fake_metadata, caplog):
mocker.patch(
Expand Down

0 comments on commit f6b934c

Please sign in to comment.