hasadna / Open-Knesset

A project aimed at making the Israeli Knesset more transparent. Python and Django based
http://oknesset.org/
BSD 3-Clause "New" or "Revised" License
106 stars 175 forks source link

Adding existing Waffle flags to development fixtures #774

Open yotammanor opened 7 years ago

yotammanor commented 7 years ago

There are currently one flag and one switch being used in production, but they are not present in local db. those flags/switches should be part of the project setup, to avoid production/development disparity.

alonisser commented 7 years ago

@yotammanor I'm not sure about that.. we certainly don't want them in "initial_data.json" automatically loaded on migration, thus production would be rolled to hard coded state every deploy+migration. So maybe dump a JSON fixture, to be used only in local dev and add it to the setup instructions?

And of course, this would never be updated when actual flag changes, and would cause dispartiy all over the place.. :(

The correct way to solve this is probably using some kind of configuration service, with different production, staging, dev environment, that should handle this kind of feature flags. But we are certainly not there..

I think the current setup is the best of bad options, until we move to a configuration service.

yotammanor commented 7 years ago

I understand. Then maybe at least add it as a warning to setup instructions? this is not a trivial step and the disparity might have consequences..

alonisser commented 7 years ago

Want to push a PR with this?