Demo, all content is generated

Shipped a preview-deploy cleaner that saved us a Vercel tier

Open · 167 views · asked by jonas_k · edited

Deletes preview deployments nobody has opened in a month.

We had around nine hundred preview deployments from closed branches, each with its own environment and some with their own database branch. This walks them, checks the branch is merged or gone, and removes them on a schedule.

Copilot wrote the API client. I added a dry-run mode first and left it on for two weeks before trusting it, which turned out to be right: the first pass would have deleted three previews still linked from open pull requests.

Comment
900 previews with their own DB branches, oof. Did the dry run catch anything you wanted to keep? rafa_dev · edited
Three branches that were open but idle. That's why dry-run stayed on for two weeks. jonas_k · edited

Activity