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

fix: #5787 Support uppercased version of "COLLECT_ANALYTICS" env var #5788

Merged

Conversation

csavage5
Copy link
Contributor

@csavage5 csavage5 commented Apr 26, 2024

PR fulfills these requirements

  • 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
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • 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)
  • 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
  • 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
  • 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

@csavage5 csavage5 requested a review from a team as a code owner April 26, 2024 05:37
Copy link

netlify bot commented Apr 26, 2024

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 441e517

Copy link

netlify bot commented Apr 26, 2024

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 441e517

Adding fallback to old lowercased version for legacy compatibility.
@jombooth jombooth changed the title fix: #5787 search for env var "COLLECT_ANALYTICS" fix: #5787 Support uppercased version of "COLLECT_ANALYTICS" env var Apr 26, 2024
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.93%. Comparing base (814bfb8) to head (441e517).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5788   +/-   ##
========================================
  Coverage    75.93%   75.93%           
========================================
  Files          158      158           
  Lines        13363    13363           
========================================
  Hits         10147    10147           
  Misses        3216     3216           
Flag Coverage Δ
pytests 75.93% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jombooth jombooth merged commit a0b30e9 into HumanSignal:develop Apr 26, 2024
30 checks passed
jombooth added a commit that referenced this pull request 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 pull request 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants