-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Value of "collect_analytics" isn't read if set via Helm #5787
Comments
16 tasks
jombooth
added a commit
that referenced
this issue
May 3, 2024
…5788) - [x] Commit message(s) and PR title follows the format `[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made` ex. `fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors` - [x] Tests for the changes have been added/updated (for bug fixes/features) - [x] Docs have been added/updated (for bug fixes/features) - [x] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.) - [x] Self-reviewed and ran all changes on a local instance (for bug fixes/features) _(check all that apply)_ - [ ] Product design - [ ] Backend (Database) - [x] Backend (API) - [ ] Frontend _(link to issue, supportive screenshots etc.)_ #5787 _(if this is a bug fix)_ Updates `base.py` to search for `COLLECT_ANALYTICS` environment variable instead of `collect_analytics` _(if this is a breaking or feature change)_ _(if this is a breaking or feature change)_ _(list all with version changes)_ _(if so describe the impacts positive or negative)_ _(if so describe the impacts positive or negative)_ Positive: backend analytics are properly disabled when deploying with Helm. _(briefly list any if applicable)_ _(briefly list any if applicable)_ _(check only one)_ - [ ] Yes, and covered entirely by feature flag(s) - [ ] Yes, and covered partially by feature flag(s) - [ ] No - [x] Not sure (briefly explain the situation below) The environment variable name is changing to all upper-case - no impact if using Helm, as it enforces all caps. Other users who pass variables in with Docker Compose or other setup methods may already be using lower case, and their setup methods may not enforce all-caps. _(check all that apply)_ - [ ] e2e - [ ] integration - [x] unit _(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)_ Analytics / logging --------- Co-authored-by: Jo Booth <jo.m.booth@gmail.com>
bmartel
pushed a commit
that referenced
this issue
May 7, 2024
…5788) ### PR fulfills these requirements - [x] Commit message(s) and PR title follows the format `[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made` ex. `fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors` - [x] Tests for the changes have been added/updated (for bug fixes/features) - [x] Docs have been added/updated (for bug fixes/features) - [x] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.) - [x] Self-reviewed and ran all changes on a local instance (for bug fixes/features) #### Change has impacts in these area(s) _(check all that apply)_ - [ ] Product design - [ ] Backend (Database) - [x] Backend (API) - [ ] Frontend ### Describe the reason for change _(link to issue, supportive screenshots etc.)_ #5787 #### What does this fix? _(if this is a bug fix)_ Updates `base.py` to search for `COLLECT_ANALYTICS` environment variable instead of `collect_analytics` #### What is the new behavior? _(if this is a breaking or feature change)_ #### What is the current behavior? _(if this is a breaking or feature change)_ #### What libraries were added/updated? _(list all with version changes)_ #### Does this change affect performance? _(if so describe the impacts positive or negative)_ #### Does this change affect security? _(if so describe the impacts positive or negative)_ Positive: backend analytics are properly disabled when deploying with Helm. #### What alternative approaches were there? _(briefly list any if applicable)_ #### What feature flags were used to cover this change? _(briefly list any if applicable)_ ### Does this PR introduce a breaking change? _(check only one)_ - [ ] Yes, and covered entirely by feature flag(s) - [ ] Yes, and covered partially by feature flag(s) - [ ] No - [x] Not sure (briefly explain the situation below) The environment variable name is changing to all upper-case - no impact if using Helm, as it enforces all caps. Other users who pass variables in with Docker Compose or other setup methods may already be using lower case, and their setup methods may not enforce all-caps. ### What level of testing was included in the change? _(check all that apply)_ - [ ] e2e - [ ] integration - [x] unit ### Which logical domain(s) does this change affect? _(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)_ Analytics / logging --------- Co-authored-by: Jo Booth <jo.m.booth@gmail.com>
bmartel
added a commit
that referenced
this issue
May 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In the Label Studio Helm chart, all environment variables are forced upper case: https://github.com/HumanSignal/charts/blob/master/heartex/label-studio/templates/app-deployment.yaml#L128
https://github.com/HumanSignal/charts/blob/master/heartex/label-studio/templates/_helpers.tpl#L338
The environment variable
collect_analytics
is searched for as lower-case, while all other environment variables are upper-case:label-studio/label_studio/core/settings/base.py
Line 613 in a9ddaa8
To Reproduce
Steps to reproduce the behavior:
global.extraEnvironmentVars.collect_analytics: "False"
in Helmhelm install ...
COLLECT_ANALYTICS
inbase.py
will always beTrue
, since Helm will set the environment variableCOLLECT_ANALYTICS
toFalse
instead ofcollect_analytics
True
will always be used, ascollect_analytics
is never setExpected behavior
As mentioned in the documentation, backend analytics should be disabled when the environment variable "collect_analytics" is set to "False": https://github.com/HumanSignal/label-studio/blob/a9ddaa8c6fe6a8ac21f3728d03127ac656a68c9e/docs/source/guide/security.md#information-collected-by-label-studio
Screenshots
![324642105-5f862c34-a5f1-40b3-bd96-5d8739b23801](https://private-user-images.githubusercontent.com/22351542/325851642-f067fbac-baa0-4838-b906-cb62748b4502.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMDg1MTcsIm5iZiI6MTcyNTEwODIxNywicGF0aCI6Ii8yMjM1MTU0Mi8zMjU4NTE2NDItZjA2N2ZiYWMtYmFhMC00ODM4LWI5MDYtY2I2Mjc0OGI0NTAyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDEyNDMzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5NGE3ODllNjRhNzU3NTk3NTFiOGM4NDIyNjE0ZDQwMDQ1NDM2ZjhiNDk3YmFiNTMwODE2YWYzNjBlZTk4MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9JDaaxqdwQIOmw4IKykFcVmAlEVd36i0e87Ek2D5IMM)
After setting
collect_analytics
to"False"
via Helm, egress traffic to external AWS endpoints is still observed:Environment (please complete the following information):
Additional context
Issue is further discussed here: #4612
The text was updated successfully, but these errors were encountered: