Skip to content

[MDS-6547] Flagsmith local fixes#3590

Merged
taraepp merged 2 commits intodevelopfrom
mds-6547-local-flagsmith-fix
Jun 30, 2025
Merged

[MDS-6547] Flagsmith local fixes#3590
taraepp merged 2 commits intodevelopfrom
mds-6547-local-flagsmith-fix

Conversation

@taraepp
Copy link
Contributor

@taraepp taraepp commented Jun 30, 2025

Objective

  • I made some typos. 😅
  • an empty value was being parsed as truthy. Made sure it came in as false if either the value was false or it was missing.

MDS-6547

Why are you making this change? Provide a short explanation and/or screenshots

flagsmithKey: "4Eu9eEMDmWVEHKDaKoeWY7",
flagsmithUrl: "https://mds-flags-dev.apps.silver.devops.gov.bc.ca/api/v1/",
flagsmithLocal: process.env.FLAGSMITH_ENABLE_LOCAL_EVALUATION || "false",
flagsmithLocal: process.env.FLAGSMITH_ENABLE_LOCAL_EVALUATION === "true" || false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was coming in as the string "false" (whether from the env or from it being blank) which == true. Eek.

ENVIRONMENT.environment = environment || "development";
ENVIRONMENT.flagsmithKey = flagsmithKey;
ENVIRONMENT.flagsmithUrl = flagsmithUrl;
ENVIRONMENT.flagsmithLocal = flagsmithLocal;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

aaaand when it was missing it was coming in as "<FLAGSMITH_ENABLE_LOCAL_EVALUATION>". Needed to add it to this function and then pass it to it from ms/core

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed for 'bcgov-sonarcloud_mds_minespace-web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@taraepp taraepp requested review from matbusby-fw and sggerard June 30, 2025 18:36
@taraepp taraepp merged commit 12d252a into develop Jun 30, 2025
21 checks passed
@taraepp taraepp deleted the mds-6547-local-flagsmith-fix branch June 30, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants