livecycle / livecycle/preevy

Feature: Scheduled deletion for environments

Open
#181 1 comment 1 reaction 0 assignees View on GitHub
enhancement need spec points: 3
Dominant language
TypeScript
Stars
2.2k
Forks
91
PR merge metrics
No merged PRs in 30d

Description

Specified in the command line:

```bash
preevy up --schedule-deletion=12h30m
preevy up --schedule-deletion="30 days"
preevy up --schedule-deletion=2024-08-12T13:14:15Z
preevy up --schedule-deletion=off
```
Running `preevy up` on an existing environment should change/remove the current schedule, but only if explicitly specified.

Implementation per driver:
- GCE: https://cloud.google.com/compute/docs/instances/limit-vm-runtime
- Kubernetes: cron job for a specific date and time in the year?
- Lightsail/Azure: Couldn't find a simple solution, may need a scheduled lambda, or a cron job on the machine itself.

This should be an optional feature per driver, this way we can implement it gradually.

If the driver doesn't support scheduled deletion, the environment should not be provisioned and the command will end with an error.

Deletion time should be included in the output of `preevy ls`.

Extra credit: set a default deletion schedule in the profile during `preevy init`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the preevy up and preevy ls command paths and the GCE, Kubernetes, Lightsail, and Azure drivers. Define how each driver supports the stated schedule formats and how preevy init could store a default. Done means explicit schedules can change or remove existing schedules, unsupported drivers fail before provisioning, and preevy ls shows deletion times.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, google-cloud, kubernetes, typescript
Domain
cli, cloud, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.