Skip to content

Conversation

iccicci
Copy link
Contributor

@iccicci iccicci commented Oct 3, 2025

Checklist

  • JIRA - LW-13680
  • Proper tests implemented
  • Screenshots added.

Proposed solution

Proposed the approach of a JSON encoded variable as after WebPack build we no longer have the power to dynamically access process.env.

Following code

for (const i of [1, 2, 3, 4]) console.log('feature', i, process.env[`FEATURE_${i}`]);
console.log('feature1', process.env.FEATURE_1);
console.log('feature2', process.env.FEATURE_2);
console.log('feature3', process.env.FEATURE_3);
console.log('feature4', process.env.FEATURE_4);

produces following logs

feature 1 undefined
feature 2 undefined
feature 3 undefined
feature 4 undefined
feature1 undefined
feature2 test
feature3 undefined
feature4 false

Proposed parsing as boolean as all FF have a boolean value. Ref: isFeatureFlagEnabled

Testing

Manually tested

@iccicci iccicci requested a review from a team as a code owner October 3, 2025 16:37
Copy link

sonarqubecloud bot commented Oct 3, 2025

@lace-bot
Copy link
Collaborator

lace-bot commented Oct 3, 2025

Allure Report

allure-report-publisher generated test report!

processReports: ✅ test report for 427c988f

passed failed skipped flaky total result
Total 33 0 4 0 37

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.

2 participants