chore(protocol-designer): Enable OT_PD_PRERELEASE_MODE for sandbox builds, so all feature flags are accessible #19948
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Protocol Designer feature flags come in two flavors: "user-facing" and "non-user-facing." User-facing flags are always accessible through the UI, even in production builds. Non-user-facing flags are also accessible through the UI, but only if the project was built with a
OT_PD_PRERELEASE_MODE=1environment variable.Features in development are usually gated behind non-user-facing flags. So, to test those features in the sandbox, the sandbox builds need to set
OT_PD_PRERELEASE_MODE=1.Goes towards EXEC-1666 in general.
Test Plan and Hands on Testing
I've done this:
OT_PD_PRERELEASE_MODE).Changelog
Update the GitHub Actions workflow to set
OT_PD_PRERELEASE_MODE=0for builds deemed "production" andOT_PD_PRERELEASE_MODE=1for builds deemed "development."Review requests
NODE_ENV, which the workflow already sets, instead ofOT_PD_PRERELEASE_MODE. My vague instinct, though, is that that wouldn't be proper. It feels likeNODE_ENV=developmentshould only control debug features in the build tools themselves, not control what the build produces. Like, in my mind, if this were C,NODE_ENV=developmentshould be like using a debug build ofgcc—it's different from runninggcc -g -O0. See also https://vite.dev/guide/env-and-mode.html#node-env-and-modes.Risk assessment
Medium. Might break the build. Might accidentally expose non-user-facing feature flags in production builds.