| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This will allow feature flags to be shared across steps in the same job, avoiding an error we saw earlier where the init action had the flag enabled, but the analyze step had it disabled. This uses the runner's temp folder to cache the flags file, which will stick around until the job completes.
| fs.writeFileSync( | ||
| cachedFeatureFlags, | ||
| JSON.stringify(actualFeatureEnablement) | ||
| ); |
Code scanning / CodeQL
Potential file system race condition
There was a problem hiding this comment.
Huh.. should we be checking files we write to?
Sorry, something went wrong.
There was a problem hiding this comment.
This does feel like an FP. I will contact the team.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!! Makes sense, just a couple of naming thoughts
Sorry, something went wrong.
| fs.writeFileSync( | ||
| cachedFeatureFlags, | ||
| JSON.stringify(actualFeatureEnablement) | ||
| ); |
There was a problem hiding this comment.
Huh.. should we be checking files we write to?
Sorry, something went wrong.
| */ | ||
| type GitHubFeatureFlagsApiResponse = Partial<Record<Feature, boolean>>; | ||
|
|
||
| export const FEATURE_FLAGS_FILE_NAME = "feature-flags.json"; |
There was a problem hiding this comment.
Wondering if this could be renamed to include local or cache somehow so it's easier to remember the difference between this file and the remote server-side flags 🤔
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks! Extra test looks 👍
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This will allow feature flags to be shared across steps in the same job, avoiding an error we saw earlier where the init action had the flag enabled, but the analyze step had it disabled.
This uses the runner's temp folder to cache the flags file, which will stick around until the job completes.
Merge / deployment checklist