Open DimedS opened 1 month ago
Thanks for opening this @DimedS. Help me understand: what would be the user-facing consequences of releasing Kedro without making these changes in Kedro-Viz?
Based on the Viz code, if users disable telemetry using new environment variables but still have a .telemetry
file with consent: True
in their project folder, Kedro-Viz will continue to send telemetry data. In other scenarios, the behavior is as expected:
def get_heap_app_id(project_path: Path) -> Optional[str]:
"""Return the Heap App ID used for Kedro telemetry if user has given consent."""
if not _IS_TELEMETRY_INSTALLED: # pragma: no cover
return None
telemetry_file_path = project_path / ".telemetry"
if not telemetry_file_path.exists():
return None
with open(
telemetry_file_path, encoding="utf8"
) as telemetry_file: # pylint: disable: unspecified-encoding
telemetry = yaml.safe_load(telemetry_file)
if _is_valid_syntax(telemetry) and telemetry["consent"]:
return _get_heap_app_id()
return None
Thanks. Linking the code for reference
Perhaps kedro-telemetry
should have this logic so that Kedro-Viz can import it? (That would make kedro-telemetry
a dependency of kedro-viz
, which already is, transitively through kedro
)
Perhaps
kedro-telemetry
should have this logic so that Kedro-Viz can import it? (That would makekedro-telemetry
a dependency ofkedro-viz
, which already is, transitively throughkedro
)
I agree; it makes sense to depend on kedro-telemetry
for handling the consent check, which is encapsulated in the _check_for_telemetry_consent()
function. This function could be beneficial for kedro-viz
. However, given that the code is currently small and straightforward, it might be wise to wait until telemetry is fully integrated into Kedro before making that changes with dependencies.
Description
We switched to an opt-out model in Kedro-Telemetry as described in issue #715. This change introduces new methods for obtaining telemetry consent, which should be incorporated into the Viz telemetry. Additionally, a new way to establish the user ID was introduced in PR #596, and this should also be updated in Viz.
Context
Why is this change important to you? How would you use it? How can it benefit other users?
Possible Implementation
(Optional) Suggest an idea for implementing the addition or change.
Possible Alternatives
(Optional) Describe any alternative solutions or features you've considered.
Checklist