Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation of telemetry consent flag for kedro run #3876

Merged
merged 15 commits into from
May 22, 2024

Conversation

lrcouto
Copy link
Contributor

@lrcouto lrcouto commented May 17, 2024

Description

Adds the --telemetry flag to kedro run, similar to the one in kedro new. Allows consent to telemetry to be granted or revoked at the same time as the run command is called.

Works together with kedro-org/kedro-plugins#681, that is required so the user will not receive the prompt to grant consent if it's given through the CLI flag.

Development notes

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

lrcouto and others added 8 commits May 17, 2024 02:02
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
…g/kedro into add-telemetry-flag-to-kedro-run
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is almost there, but I left some comments. Most importantly on the public utils methods.

@@ -497,3 +497,38 @@ def _split_load_versions(ctx: click.Context, param: Any, value: str) -> dict[str
load_versions_dict[load_version_list[0]] = load_version_list[1]

return load_versions_dict


def validate_input_with_regex_pattern(pattern_name: str, input: str) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should still be a private method as we don't want users to start using this.

sys.exit(1)


def parse_yes_no_to_bool(value: str) -> Any:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. And I'm actually thinking that the name is a bit misleading. If I understand correctly this parses yes to True, but otherwise returns None, so maybe it should be named parse_yes_to_bool ?

Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Copy link
Contributor

@DimedS DimedS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @lrcouto , LGTM! Great idea to move regex validation to utils!

@lrcouto lrcouto merged commit 570f66a into main May 22, 2024
41 checks passed
@lrcouto lrcouto deleted the add-telemetry-flag-to-kedro-run branch May 22, 2024 12:58
lrcouto added a commit that referenced this pull request May 22, 2024
@lrcouto lrcouto restored the add-telemetry-flag-to-kedro-run branch May 22, 2024 13:01
@lrcouto lrcouto deleted the add-telemetry-flag-to-kedro-run branch May 22, 2024 13:03
lrcouto added a commit that referenced this pull request May 23, 2024
astrojuanlu pushed a commit that referenced this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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