kedro icon indicating copy to clipboard operation
kedro copied to clipboard

Add an option for `kedro new` and `kedro run` to skip telemetry (e.g. for CI/CD environment)

Open noklam opened this issue 1 year ago • 9 comments

Description

When you have created a Kedro project and execute a kedro command on the CLI for the first time it asks for consent to run kedro-telemetry. This is annoying when you create kedro projects as part of a CI/CD run.

The task is to add an option to kedro new e.g. --telemetry, --no-telemetry to allow the user to immediately register their consent choice for a Kedro project and skip the prompt for it later on.

Discuss with design what flag name would be most consistent with the other kedro new flags.

Context

Can I also ask for telemetry consent at this point as well? For CI/CD workflows this is critical. Originally posted by @datajoely in https://github.com/kedro-org/kedro/issues/2865#issuecomment-1657948384

Implement logic in the kedro new command that detects if it's being run in CI and if so, whether consent has been given and if that's not the case then it will advice the user on how to do this.

i.e. kedro new --skip-ci

noklam avatar Jul 31 '23 10:07 noklam

This should also have the option to consent too not just opt out

datajoely avatar Nov 02 '23 09:11 datajoely

Brainstorming

  • --consent-telemetry/--no-consent-telemetry
  • --accept-telemetry/--reject-telemetry
  • --opt-in-telemetry/--opt-out-telemetry

astrojuanlu avatar Nov 02 '23 12:11 astrojuanlu

I would do kedro new --telemetry/-t {false,true,t,f,T,F} default True?

datajoely avatar Nov 02 '23 12:11 datajoely

Telemetry doesn't affect only CI/CD environments: also Jupyter-based ones (that don't have good support for interactive prompts) https://linen-slack.kedro.org/t/16098616/hi-i-m-running-a-kedro-project-on-databricks-and-when-i-load#6573391b-2b80-41ce-9265-e61041be9ff5

image

astrojuanlu avatar Nov 30 '23 20:11 astrojuanlu

Can we close kedro-org/kedro-plugins#483 and centralize the conversation here?

astrojuanlu avatar Nov 30 '23 20:11 astrojuanlu

And this as a example of how we need to fix the consent workflow in non-interactive environments 😂 https://github.com/deepyaman/jaffle-shop/blob/48d47db7bfae4495f84cfafb1217923a7cf7b49b/.github/workflows/kedro-viz.yml#L26C8-L26C49

Originally posted by @datajoely in https://github.com/kedro-org/kedro-devrel/issues/129#issuecomment-1919218161

astrojuanlu avatar Jan 31 '24 14:01 astrojuanlu

When I saw this issue I jumped directly to brainstorming https://github.com/kedro-org/kedro/issues/2867#issuecomment-1790638019 but even after identifying that this is not related to the kedro new command itself https://github.com/kedro-org/kedro/issues/2867#issuecomment-1834545065 I didn't stop and think what part of the user journey we intended to fix.

Added more thoughts on https://github.com/kedro-org/kedro/pull/3701#pullrequestreview-1945846072

astrojuanlu avatar Mar 19 '24 10:03 astrojuanlu

Partially addressed by #3701, let's add this flag to kedro run too as agreed on https://github.com/kedro-org/kedro/pull/3701#issuecomment-2015339202

astrojuanlu avatar Apr 04 '24 07:04 astrojuanlu

Reopening because https://github.com/kedro-org/kedro-plugins/pull/681 still needs some reviewing.

lrcouto avatar May 22 '24 13:05 lrcouto

After discussing this a bit more internally, we decided to skip this idea. The way we'll solve the original user problem https://github.com/kedro-org/kedro/issues/1640 will be different, will leave some context there.

I'm closing this as "not planned".

astrojuanlu avatar May 24 '24 10:05 astrojuanlu