ansibullbot icon indicating copy to clipboard operation
ansibullbot copied to clipboard

Feature flags framework

Open webknjaz opened this issue 5 years ago • 2 comments

I think having a quick way to enable/disable certain code paths based on a toggle and a rollout percentage is essential to having stable bot in production. This could also facilitate restricted testing of new features.

webknjaz avatar Dec 08 '18 11:12 webknjaz

Could you please provide some examples?

gundalow avatar Dec 10 '18 15:12 gundalow

if feature_enabled('new_explanation_comment', issue_id=xxxx):
  # use new experimental comment template
else:
  # use the old one

and config

new_explanation_comment: 5%

meaning that it'd use this comment for 5% of issues only. or use this just for wrapping new code. there's a lot of uses of this technique.

webknjaz avatar Dec 11 '18 15:12 webknjaz