Hacker News new | ask | show | jobs
by verdverm 1252 days ago
We add a "branch config" JSON file for each branch, which is later merged with some CUE. We put metadata and "feature flag" like values in there. This full config value is passed to all subjobs and makes it easy to change and grow our CI.

The main problem I see with real feature flags in CI is that it can make reproducing a build nearly impossible. What happens if someone flips a flag in the middle of a build? (where that flag value is checked in multiple places, so the flip happens in between the checks)

1 comments

Would logging feature flag values be enough? Then you could look at stdout to see what the value was during each job
How would you ensure the same values after pushing a new commit or retriggering a build at the same commit? There are many times where external failures, like NPM returning a 50x for a package, that requires a build to be rerun at the same commit.

It seems impossible to ensure reproducible CI when some of that configuration lives outside of source control. Given the CI files are in source control, you can just change them there, rather than using feature flags. Using feature flags comes with a host of hard problems that you ought to just avoid by not using them.