nullstone-io / nullstone

Nullstone is a customizable developer platform launched on your cloud accounts.
https://nullstone.io
MIT License
39 stars 1 forks source link

Infra module upgrades: Only allow +1 major per apply #58

Open BSick7 opened 2 years ago

BSick7 commented 2 years ago

Summary

This feature provides guard rails around infrastructure upgrades.

Intended Outcome

  1. Users are prevented from applying infrastructure changes that could cause irreversible damage to infrastructure.
  2. Users are prevented from applying infrastructure changes that result in corrupted state files.

How will it work?

When a user runs "Update" on an existing app, datastore, domain, or block that is marked to use "latest" version of the infra module, Nullstone will only allow new versions of the module that are at most +1 major version. Once successfully applied, the engine will allow an upgrade with another +1 to major.

Example

Caveats

Nullstone is optimized for a "roll-forward" provisioning strategy. If there is a bug or change that needs to be applied, then a new version is introduced to remediate.

However, there are cases when a user's infrastructure is in a bad state and a version rollback is necessary. This feature would also enforce a max of -1 major version rollback as well.