opengovsg / ts-template

A template repository for TypeScript projects in Open Government Products
https://opengovsg.github.io/ts-template
Other
36 stars 16 forks source link

Disable auto-merging of dependency upgrades in mergify.yml #1369

Closed zxt-tzx closed 2 years ago

zxt-tzx commented 2 years ago

In mergify.yml, currently non-major dependabot upgrades areautomatically merged into develop

I discussed with @timotheeg and @lamkeewei, it seems like this is a bad idea:

It might be OK to do automatic merging if the repo is v well-tested, so that we can be sure that everything works as intended. But I think that's not a standard that we can assume all repos meet this standard.

In fact, for mission-critical products, it might be even better to err on the side of caution and pin dependencies to explicit versions and do controlled, tested upgrades.

As such, insofar as ts-template is supposed to embody a set of safe defaults, I don't think the current auto-merging of dependencies upgrade is such a default.

(As a side note, can I be given access rights to this? Tried to create a PR but was blocked.)

zxt-tzx commented 2 years ago

Example of bug induced by mergify's automatic merging: https://github.com/opengovsg/askgovsg/commit/e1be4ff2ace6faae96e4b578e4cff2bd6eec3a89

zxt-tzx commented 2 years ago

Example of dependency-pinning: https://github.com/opengovsg/postmangovsg/pull/1578

LoneRifle commented 2 years ago

Given that ts-template is meant to be a starting base for new products built by engineering, we want to keep deps in this particular repository as recent as possible, to ensure that they start with the most recent packages.

This should be sustained even as engineers continue to build out their product; any stability risk from dep changes can be mitigated by the fact that the products would not be heavily used in its early days.

Engineers are free to discard the rolling dep updates at any point in their dev process once this template is used to start their codebase.