- Add a text field that accepts an integer for the number of days to keep an environment around before it is automatically deleted.
- The maximum allowed number of days is 90. If the user puts a number zero or less or 91 or more, patchdemo should give an error and not allow the environment to be created until fixed.
- The textbox should say "30" by default when creating a new environment.
- in the environment table, there should be an "Expires on" columns in the patchdemo UI populated with the date on which the environment will be deleted
- patchdemo (or something else?) should regularly prune (i.e. delete) environments that are expired, e.g.
- use some type of cron / schedule container tool
Note:
- the behavour only needs to exist for patchdemo environments, not other environments created through catalyst
- our preference is that the "expiration date" is stored as a date, right than the number of days it's meant to live
We are accumulated disk cost for legacy environments, and it would be nice to automatically clear them.
- also check if environments are deleted after either phab tasks are closed or gerrit patches are merged (I believe this was the behaviour in legacy-patchdemo)
- this is just for our information and to create follow-on stories