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

Feature/sudoless metrics #2605

Merged
merged 3 commits into from Jan 19, 2021
Merged

Feature/sudoless metrics #2605

merged 3 commits into from Jan 19, 2021

Conversation

AnOctopus
Copy link
Contributor

Issue: #1584 is what prompted this, but will not be resolved until we remove the v1 ID in a few months. This PR is a stepping stone towards that.

Description:

  • Add v3 machine id for metrics, use it as the metrics id, update protobuf

@AnOctopus AnOctopus requested a review from a team January 15, 2021 01:44
Copy link
Collaborator

@kmcgrady kmcgrady left a comment

Choose a reason for hiding this comment

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

Code looks great and very straightforward! Thanks for getting this in. I added one comment which you can decide to act on or not.

with open("/var/lib/dbus/machine-id", "r") as f:
machine_id = f.read()

return machine_id
Copy link
Collaborator

Choose a reason for hiding this comment

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

All looks great! Might be nice to break out these file paths into constants cause I see them around everywhere. Might help avoid an accidental misspelling.

That being said, this is very straightforward and might not need to be over DRYed.

Step 2 of the metrics user ID improvement plan.
Duplicates of the v1 tests, since those covered the cases that remain in v3,
and we will remove v1 and its tests later.

Also fix formatting of some python files.
@AnOctopus AnOctopus merged commit 1cff62a into develop Jan 19, 2021
@AnOctopus AnOctopus deleted the feature/sudoless-metrics branch January 19, 2021 17:46
tconkling added a commit to tconkling/streamlit that referenced this pull request Jan 19, 2021
* develop:
  Feature/sudoless metrics (streamlit#2605)
  Have st.number_input warn user of mismatched type and format string (streamlit#2604)
  Remove extra period from sentence (streamlit#2601)
  Revert "Deploy button front (streamlit#2552)" (streamlit#2599)
  Fix slider UX (streamlit#2596)
CFrez pushed a commit to CFrez/streamlit that referenced this pull request Jan 21, 2021
* Add and use sudoless machine id getter for metrics

Step 2 of the metrics user ID improvement plan.

* Add machine-id v3 tests

Duplicates of the v1 tests, since those covered the cases that remain in v3,
and we will remove v1 and its tests later.

Also fix formatting of some python files.

* DRY out machine ID paths into global constants
kmcgrady pushed a commit that referenced this pull request Jan 25, 2021
* switched react-katex package

* lockfile updated

* update test to corrected spelling

* decapitalize KaTex

* Fix slider UX (#2596)

* Fix slider UX

* Add snapshot

* Revert "Deploy button front (#2552)" (#2599)

* Revert "Deploy button front (#2552)"

This reverts commit 0f66b6e.

* Fix merge (erm... revert) conflict.

* Revert "Deploy button py (#2535)"

This reverts commit 0bbc7aa.

Co-authored-by: karrie <karrie@streamlit.io>

* Remove extra period from sentence (#2601)

* Have st.number_input warn user of mismatched type and format string (#2604)

* Add %u to list of valid number_input formatters

* Have number_input warn user of mismatched type and format string

* Use more modern f-string syntax instead of .format()

* Feature/sudoless metrics (#2605)

* Add and use sudoless machine id getter for metrics

Step 2 of the metrics user ID improvement plan.

* Add machine-id v3 tests

Duplicates of the v1 tests, since those covered the cases that remain in v3,
and we will remove v1 and its tests later.

Also fix formatting of some python files.

* DRY out machine ID paths into global constants

* Increase side padding to 5rem when app is in wide mode (#2613)

* Increase side padding to 5rem when app is in wide mode

* Upload Cypress snapshot

* Rerender Maybe components when they're first disabled (#2617)

\#2395 ended up being caused by this since we don't rerender placeholder
components created by `st.empty()` when react props/state change as a
performance optimization, but we need to do so when replacing an
existing component with an empty one to get rid of what's currently
drawn on screen.

Closes #2395

Co-authored-by: karrie <karrie@streamlit.io>
Co-authored-by: Thiago Teixeira <thiago@streamlit.io>
Co-authored-by: Randy Zwitch <randy@streamlit.io>
Co-authored-by: Vincent Donato <vincent.rdonato@gmail.com>
Co-authored-by: Amanda Walker <amanda@amandawalker.io>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: Vincent Donato <vincent@streamlit.io>
@hkokko
Copy link

hkokko commented Apr 8, 2021

  1. So will this solve the problem of requiring sudo to install or is something else required. 2. Is this merged and available in the mainstream package of streamlit

@tvst
Copy link
Contributor

tvst commented Apr 22, 2021

This PR is merged, but it doesn't actually solve the sudo problem. It is the first step in solving it, though!

With this PR, we now compute 3 IDs, one of which depends on sudo. We want to get rid of 2 of these IDs (including the sudo one), but first need to collect a few months of data with all 3 IDs so we can understand how each of them impact our metrics.

My guess is this will happen in the next 3 months or so.

@hkokko
Copy link

hkokko commented Sep 4, 2021

Is this sudoless working now

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.

None yet

4 participants