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

feat: Disabled enforce Countly by env variable #18175

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

przemvs
Copy link
Contributor

@przemvs przemvs commented Oct 18, 2024

Description

Added flag to disable enforcing Countly.

Checklist

  • mentions the JIRA issue in the PR name (Ex. WPB-423)
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Copy link

sonarcloud bot commented Oct 18, 2024

const {isDev, isEdge, isInternal, isLocalhost, isStaging, name} = getWebEnvironment();

if (isDev || isEdge || isInternal || isLocalhost || isStaging) {
if (!DISABLE_ENFORCE_COUNTLY && (isDev || isEdge || isInternal || isLocalhost || isStaging)) {
Copy link
Contributor

@V-Gira V-Gira Oct 18, 2024

Choose a reason for hiding this comment

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

I feel like this would achieve the same thing:

Suggested change
if (!DISABLE_ENFORCE_COUNTLY && (isDev || isEdge || isInternal || isLocalhost || isStaging)) {
if (isEdge || isInternal || isStaging) {

We only want to enforce it on internal envs, not really dev envs

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 46.37%. Comparing base (0f86852) to head (7227f65).
Report is 28 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #18175      +/-   ##
==========================================
- Coverage   46.38%   46.37%   -0.02%     
==========================================
  Files         796      796              
  Lines       25790    25790              
  Branches     5884     5884              
==========================================
- Hits        11962    11959       -3     
- Misses      12331    12334       +3     
  Partials     1497     1497              

Copy link
Member

@aweiss-dev aweiss-dev left a comment

Choose a reason for hiding this comment

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

This PR should be dropped.

It used the "wrong" logic, to disable enforcement via a env variable. We already changed the enforcement to use a env variable instead of in-app logic

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.

5 participants