nullstone icon indicating copy to clipboard operation
nullstone copied to clipboard

Infra module upgrades: Only allow +1 major per apply

Open BSick7 opened this issue 3 years ago • 0 comments

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

  • User has a datastore postgres0 using aws-rds-postgres using latest and recently applied with v0.9.1
  • aws-rds-postgres has v0.10.0 and v0.11.0 available
  • When clicking update, Nullstone will select and only allow v0.10.0
  • After completing v0.10.0 successfully, user will be able to select and apply v0.11.0

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.

BSick7 avatar Apr 25 '22 15:04 BSick7