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

fix(telemetry): Set default identity value #830

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

ElenaKhaustova
Copy link
Contributor

@ElenaKhaustova ElenaKhaustova commented Sep 10, 2024

Description

Solves #815

Development notes

The identity parameter is mandatory when sending data to the heap. Not passing it or setting it to "" or None causes the heap server to return response code 400.

The problem was that we used identity=self._user_uuid. If we failed to read/generate user_uuid, it was treated as an empty string, so passing it to identity caused response code 400 when sending data to the server.

To handle the above case MISSING_USER_IDENTITY constant was added, which is used as a default value for the identity in case user_uuid is "" or None.

Checklist

  • 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 relevant RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

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

Tested locally!

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, @ElenaKhaustova !

@ElenaKhaustova ElenaKhaustova merged commit 552b973 into main Sep 10, 2024
10 checks passed
@ElenaKhaustova ElenaKhaustova deleted the 815/fix-telemtry-uuid branch September 10, 2024 16:49
harm-matthias-harms pushed a commit to harm-matthias-harms/kedro-plugins that referenced this pull request Oct 1, 2024
* Set default identity

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Updated test_before_command_run_anonymous

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Fix lint

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

---------

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Signed-off-by: Harm Matthias Harms <matthias.harms@quis.de>
MinuraPunchihewa pushed a commit to MinuraPunchihewa/kedro-plugins that referenced this pull request Oct 1, 2024
* Set default identity

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Updated test_before_command_run_anonymous

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Fix lint

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

---------

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Signed-off-by: Minura Punchihewa <minurapunchihewa17@gmail.com>
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.

4 participants