cds-snc / platform-forms-client

NextJS application that serves the public-facing website for Forms
https://forms-staging.cdssandbox.xyz/
MIT License
28 stars 12 forks source link

Independant Flags for PR Review Environment #3842

Open bryan-robitaille opened 1 week ago

bryan-robitaille commented 1 week ago

In the existing PR Review model the feature flags settings are reused from the existing Staging environment. This can cause issues when new feature flags need to be tested on PR Review branches as they cannot be turned on/off independently of the Staging Environment.

Existing solution (best viewed as GitHub issue):

flowchart TD
    A[Staging Image Startup] -->|Check Flags| B{Flags Exist}
    F[PR Review App] --> |read / write| E
    G[Staging App] --> |read / write| E
    B --> |yes| C[Update new / removed Flags]
    B --> |no| D[Create Flags\n with default values ]
    C --> E[Redis 'flags' contained in set]
    D --> E

A solution needs to be developed to allow PR Review environments to run in isolation of the feature flag settings. There is an existing Environment variable in PR Review containers that identify them as such. The REVIEW_ENV variable is only set in the PR Review image.

Acceptance Criteria: