kedro-org / kedro-plugins

First-party plugins maintained by the Kedro team.
Apache License 2.0
91 stars 83 forks source link

telemetry: Fix masking of CLI commands #371

Closed ankatiyar closed 7 months ago

ankatiyar commented 11 months ago

Description

Some CLI commands are not masked properly before sending to Heap. This is not a bug that users will encounter very often but would be good to fix!

Context

For complete context read - https://github.com/kedro-org/kedro/issues/2522#issuecomment-1747205967

The way masking works in telemetry is, it imports KedroCLI from the kedro package. kedro-telemetry uses that to build a vocabulary of sorts. So when it receives a command that triggered this hook -> ['run', '--pipeline', 'pipe1'], it goes through the list and masks things that are not in the dictionary eg. ['run', '--pipeline', '*****']. So if it receives ['run', '--pipeline', 'airflow'], this is not masked properly because "airflow" is a valid kedro command (kedro airflow create with the kedro-airflow plugin) and the word "airflow" is not masked.

Possible Implementation

Ideally, stop relying on the imported KedroCLI to do the masking. This will be one step closer to the general goal of revamping the kedro-telemetry workflow.

Possible Alternatives

(Optional) Describe any alternative solutions or features you've considered.

McDonnellJoseph commented 11 months ago

Hello is someone already working on this ?

ankatiyar commented 11 months ago

@McDonnellJoseph Not yet, feel free to open a PR for this!