Skip to content

Conversation

@blackary
Copy link
Collaborator

📚 Context

The Streamlit telemetry backend does not use the data that is being sent from the frontend through identifies events. This replaces these identifies calls with a single call.

Please describe the project or issue background here

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe: Analytics update

🧠 Description of Changes

  • Add bullet points summarizing your changes here

    • This is a breaking API change
    • This is a visible (user-facing) change

Revised:

Insert screenshot of your updated UI/code here

Current:

Insert screenshot of existing UI/code here

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

🌐 References

Does this depend on other work, documents, or tickets?

  • Issue: Closes #XXXX

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

Copy link
Contributor

@tconkling tconkling left a comment

Choose a reason for hiding this comment

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

Looks great! Needs a couple simple credentials.py tests - and we should also discuss whether we can remove (maybe in a separate PR) the "installation ID" and "email" properties from frontend code that currently uses them.

@blackary
Copy link
Collaborator Author

@tconkling I think I addressed all your suggestions -- let me know if there are other changes you would like me to make

Copy link
Contributor

@tconkling tconkling left a comment

Choose a reason for hiding this comment

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

Great, thanks Zachary! I left a few more nitpicky feedbacks; once those are fixed, let's merge it in!

(Also note to self/anyone else following along - I think we can remove email from UserInfo.proto after this is merged.)

@tconkling tconkling added the security-assessment-completed Security assessment has been completed for PR label Apr 11, 2023
@tconkling
Copy link
Contributor

Huzzah, ready to merge! @blackary do you have merge privs or should I hit the button?

@blackary
Copy link
Collaborator Author

@tconkling Ain't got the power -- go for it!

@sfc-gh-tteixeira
Copy link
Contributor

sfc-gh-tteixeira commented Apr 11, 2023

Just the usual reminder about double/triple/quadruple checking that this doesn't break anything in our telemetry. Because mistakes there live with us forever, as users continue to use old versions of Streamlit.

Things to do: look at network traffic, at Segment traffic, at data coming into our backend, etc. And not just you, but have someone else look at it too.

@blackary
Copy link
Collaborator Author

Thanks for the reminder, @sfc-gh-tteixeira -- let me do some more local testing with the whl

pythonVersion: environmentInfo.pythonVersion,
installationId: userInfo.installationId,
installationIdV3: userInfo.installationIdV3,
authorEmail: userInfo.email,
Copy link
Collaborator

@lukasmasuch lukasmasuch Apr 13, 2023

Choose a reason for hiding this comment

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

I think there are also a two other aspects on the python side that we can remove related to the email:

and

if Credentials.get_current().activation:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lukasmasuch I feel a bit less confident about being sure what all those touch (e.g. that would seem to affect app_session_test)-- if someone else would be willing to remove those in a separate PR, that would be appreciated

Copy link
Collaborator

Choose a reason for hiding this comment

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

@blackary yep, I can make the changes in a separate PR 👍

that would seem to affect app_session_test

You are probably referring to these user_info things here, or?

user_info={"email": "test@test.com"},

There is another user_info.email in our code, which is completely unrelated to this user_info.email 😅 I think most/all of the user user_info email uses are referring to the st.user feature, but it indeed makes this very confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that is what I was seeing, and assumed it was related 😂

Copy link
Collaborator

Choose a reason for hiding this comment

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

I started a fast follow PR here

Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM as well 👍 I believe we can also remove two additional parts related to email (see comment above)

@blackary
Copy link
Collaborator Author

@tconkling @lukasmasuch I have tested this on my end and everything looks good, if someone would be willing to merge this in.

@lukasmasuch lukasmasuch merged commit 311cc32 into streamlit:develop Apr 19, 2023
tconkling added a commit to tconkling/streamlit that referenced this pull request Apr 19, 2023
* develop:
  Fix issue with deprecated asyncio test variable (streamlit#6517)
  No longer send unnecessary identify calls from frontend (streamlit#6464)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants