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)
Tree Management
Treeherder
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.
Assignee | ||
Updated•9 years ago
|
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
Assignee | ||
Comment 1•9 years ago
|
||
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)
Updated•9 years ago
|
Attachment #8670915 -
Flags: review?(mdoglio) → review+
Comment 2•9 years ago
|
||
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.
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•9 years ago
|
Blocks: treeherder-heroku
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
Assignee | ||
Updated•9 years ago
|
No longer blocks: treeherder-heroku, 1197186
You need to log in
before you can comment on or make changes to this bug.
Description
•