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

[local-preview] honour DO_NOT_TRACK env variable #11430

Merged
merged 1 commit into from
Jul 20, 2022
Merged

Conversation

Pothulapati
Copy link
Contributor

Description

Currently, There is no way to disable telemetry for local-preview
as we run the cronjob manaully during init, when Gitpod is ready.

This fixes that by honouring DO_NOT_TRACK envrionment variable
, which when set prevent the script from triggering the cronjob manually.

Signed-off-by: Tarun Pothulapati tarun@gitpod.io

Related Issue(s)

Fixes #11350

How to test

Add -e DO_NOT_TRACK=1 to the following docker run command

docker run -p 443:443 --privileged --name gitpod --rm -it -v gitpod:/var/gitpod eu.gcr.io/gitpod-core-dev/build/local-preview

Release Notes

[local-preview] honour `DO_NOT_TRACK` env variable.

Documentation

Werft options:

  • /werft with-preview

@Pothulapati Pothulapati requested a review from a team July 18, 2022 06:36
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label Jul 18, 2022
@Pothulapati Pothulapati added do-not-merge/work-in-progress and removed size/XS team: delivery Issue belongs to the self-hosted team labels Jul 18, 2022
# honour DO_NOT_TRACK if set
if [ -z "${DO_NOT_TRACK}" ]; then
# manually tun the cronjob
kubectl create job gitpod-telemetry-init --from=cronjob/gitpod-telemetry
Copy link
Contributor Author

Choose a reason for hiding this comment

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

had to move this inside as run_telemetry also is useful for readyiness and showing that Gitpod is ready.

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

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

Looks good. Just a thought, the DO_NOT_TRACK also works if you set DO_NOT_TRACK=0 - is it worth (perhaps in a future PR) setting the if statement to be "IF variable is set AND is equal to 1"?

/hold approving and you can decide how you want to resolve this (if indeed you do)

@Pothulapati Pothulapati force-pushed the tar/lp-do-not-track branch 3 times, most recently from 4221d2a to b58f2db Compare July 19, 2022 13:16
@lucasvaltl
Copy link
Contributor

lucasvaltl commented Jul 19, 2022

👋 Question on this - when we set do-not-track, does all telemetry get turned off (incl. the regular nightly data package that gets sent also outside of local preview? Context: I'm thinking that it might be misleading if we don't turn that off as well, however I am wary of increasing the scope and complexity here.

@Pothulapati
Copy link
Contributor Author

@lucasvaltl Yep, You are right. It would still run daily. My reason for knowingly skipping was that local-preview is short-lived, but we can indeed disable the telemetry job. Will update the PR based on the complexity it takes.

@Pothulapati Pothulapati force-pushed the tar/lp-do-not-track branch from b58f2db to 2b90927 Compare July 20, 2022 07:18
Currently, There is no way to disable telemetry for `local-preview`
as we run the cronjob manaully during init, when Gitpod is ready.

This fixes that by honouring [`DO_NOT_TRACK` envrionment variable](https://consoledonottrack.com/)
, which when set prevent the script from triggering the cronjob manually.

Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
@Pothulapati Pothulapati force-pushed the tar/lp-do-not-track branch from 2b90927 to 13ee67a Compare July 20, 2022 10:19
@Pothulapati
Copy link
Contributor Author

@lucasvaltl Updated the PR to also disable the daily telemetry job when DO_NOT_TRACK is set.

@Pothulapati
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 63e4b0f into main Jul 20, 2022
@roboquat roboquat deleted the tar/lp-do-not-track branch July 20, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[local-preview] Allow for opt out of telemetry
4 participants