-
Notifications
You must be signed in to change notification settings - Fork 243
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
Allow controlling telemetry via the ODO_TRACKING_CONSENT
environment variable
#6258
Allow controlling telemetry via the ODO_TRACKING_CONSENT
environment variable
#6258
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
One thing that I have noticed is that if I do We haven't discussed this, but I think that the env variable should override whatever is set in preference. |
Indeed, that makes sense. I'll change that behavior. |
…emetry preference See [1] for more context. [1] https://github.com/redhat-developer/odo/pull/6258\#issuecomment-1293736398
Done in f8e109591. |
…emetry preference See [1] for more context. [1] https://github.com/redhat-developer/odo/pull/6258\#issuecomment-1293736398
cfc6464
to
f8e1095
Compare
Rebased and force-pushed to fix conflicts with documentation.
E2E Tests fixed by #6260 |
pkg/segment/segment.go
Outdated
} else if cfg.GetConsentTelemetry() { | ||
} | ||
|
||
if trackingConsent == "yes" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have functions trackingConsentEnabled
/trackingConsentDisabled
instead, so we could rename the values or add aliases later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - added in 48669d3
(#6258).
This made me realize that I had few cases not tested, e.g., when the variables are not present in the env. So I added more unit tests in 75f2321
(#6258)
Co-authored-by: Armel Soro <asoro@redhat.com>
…_CONSENT' in integration tests
…tests `odo` behavior might be altered based on certain environment variables. So this is to help debug future issues that might happen. Because the process environment also contains the current OS environment, we purposely limit the content to variables prefixed with 'ODO_' or particular ones (like 'TELEMETRY_CALLER').
…nd 'ODO_TRACKING_CONSENT'
…'segment.DisableTelemetryEnv' However, due to [1], line-based directives do not seem to be working.
…emetry preference See [1] for more context. [1] https://github.com/redhat-developer/odo/pull/6258\#issuecomment-1293736398
…review This would make it easier to rename the values if needed or add aliases later.
… not there in the env
551198e
to
f014337
Compare
Had to rebase and force-push to fix the integration tests (#6260). |
… suggested in review
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/lgtm |
/approve |
@kadel Can you please take another look at this PR and approve if it is okay for you? Thanks. |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feloy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this:
/kind feature
/area telemetry
What does this PR do / why we need it:
See #6253
Which issue(s) this PR fixes:
Fixes #6253
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: