kedro-org / kedro-plugins

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

Telemetry breaks everything if there's no write permissions #11

Closed antonymilne closed 2 years ago

antonymilne commented 2 years ago

Description

As seen on databricks repos, which currently do not have write access, running any kedro command in a directory with no write access will raise an error with kedro-telemetry which then stops kedro from running everything.

This isn't the first time that an exception raised by kedro-telemetry has stopped kedro commands from working rather than just raising a warning and carrying on. I wonder if we should wrap the whole plugin in a try/except to catch any exceptions we don't anticipate. A broken kedro-telemetry shouldn't prevent users from using kedro.

Steps to reproduce

  1. Go to https://gitpod.io/#https://github.com/kedro-org/kedro
  2. pip install kedro-telemetry
  3. chmod a=rx /workspace/project
  4. kedro info

This will give the following exception and not execute the kedro command at all:

PermissionError: [Errno 13] Permission denied: '/workspace/project/.telemetry'
merelcht commented 2 years ago

"A broken kedro-telemetry shouldn't prevent users from using kedro." -> No error in kedro-telemetry should prevent a user from running Kedro, so as part of this fix ensure that other errors won't break Kedro either.