isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

IS-506: Migrate GGS Whitelist Feature Flag to GB #928

Closed harishv7 closed 1 year ago

harishv7 commented 1 year ago

Problem

We are currently using env vars to rollout GGS implementation which requires a rebuild each time we change something.

Closes IS-506

Solution

Use GrowthBook feature flag. Introduces a new flag ggs_whitelisted_repos with a json structure of { "repos": string[] }. Please check the portal for more info.

Note: To be reviewed in conjunction with IS-310 and IS-312

Breaking Changes

Tests

Deploy Notes

Please remove existing env var of WHITELISTED_GIT_SERVICE_REPOS from EB.

Deprecated environment variables:

New feature flags

harishv7 commented 1 year ago

Implementation looks fine! It looks like it's only active on write/rollback route handlers though, so if we ever need to modify the content we're passing via GB we'll need to add this to the read route handler as well. We can just add this in as needed in future

@alexanderleegs sounds good. we can add in when we have a flag that touches the read route handler. for ggs, i have replaced all instances of isRepoWhitelisted with the feature flag