cds-snc / cds-snc/platform-forms-client

Independant Flags for PR Review Environment

Open
#3,842 0 comments 0 reactions 0 assignees View on GitHub
core reliability tech debt testing
Dominant language
TypeScript
Stars
46
Forks
16
Avg merge
1d 9h
Merged PRs (30d)
91

Description

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):

```mermaid
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:
- [ ] The solution must not rely on code changes that can be accidentally merged into `develop` and overwrite staging / production settings
- [ ] The solution must clean up after itself if feature flag artifacts are created during it's lifetime
- [ ] The solution should be transparent to the developer working on new feature flags. No new process other then modifying the existing flag-initialization json should be implemented.

Contributor guide

Open the contributing guide

Research direction

Start by locating the PR Review container startup, the existing flag-initialization JSON, and the code that uses REVIEW_ENV to access the Redis flags set. Trace how staging initializes and cleans up feature-flag artifacts, then define an isolated lifecycle that meets the acceptance criteria without requiring a new developer process.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, redis, typescript
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.