Closed Bug 1212447 Opened 9 years ago Closed 9 years ago

Allow setting the data retention time via an env variable

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Apart from rare local development use-cases, we want to stop using local.py to store configuration, since it goes against the 12-factor methodology. One of the last reasons for needing to have a local.py on stage/prod is that for stage, we specify: DATA_CYCLE_INTERVAL = timedelta(days=45) In order to set this via an environment variable we should have the config value be an int, not a timedelta(). To make for an easier transition, we should probably use another variable name - then we can just get it added to the environment on stage ahead of time.
Blocks: 1197186
Depends on: 1212461
Summary: Switch DATA_CYCLE_INTERVAL to an int, not a timedelta → Rename DATA_CYCLE_INTERVAL to DATA_CYCLE_DAYS and make it an int, not a timedelta
With bug 1212461 and then this, we'll be able to stop using local.py on stage/prod, which will mean bug 1197186 is simpler, since we don't have to worry about supporting the old local.py location whilst waiting for puppet to be updated :-)
Attachment #8670915 - Flags: review?(mdoglio)
Attachment #8670915 - Flags: review?(mdoglio) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/a170d6c04772fdd2f5787c391159bc9d53bf4f3c Bug 1212447 - Allow setting the data retention time via an env variable By storing the duration as an int rather than a timedelta, we can set it via the environment, rather than having to rely on local.py. The variable has also been renamed to ease the transition and also make its purpose clearer. Prod/Heroku use the default duration, and stage has already had DATA_CYCLE_DAYS set to 45 in its environment, for parity with the old stage local.py DATA_CYCLE_INTERVAL setting.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Summary: Rename DATA_CYCLE_INTERVAL to DATA_CYCLE_DAYS and make it an int, not a timedelta → Allow setting the data retention time via an env variable
Blocks: 1212822
No longer blocks: treeherder-heroku, 1197186
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: