General Upgrade Steps
This guide takes you through the recommended steps to take when upgrading your Panfactum version.
Before you being, please ensure you have reviewed the guide for pinning the Panfactum version.
We only support upgrading to the next major version in sequence. For example, if there exists the versions 24-01.1, 24-07.1, and 25-01.1, and you are currently using version 24-01.1, you MUST first upgrade to version 24-07.1 BEFORE you upgrade to version 25-01.1.
Review the Changelogs
Some version upgrades require taking specific actions that we call out in the new release’s changelog. Make sure you have reviewed the changes and understand what steps you need to take.
Update Local Development Environment
Update the version in your
flake.nixfile.{ inputs = { flake-utils.url = "github:numtide/flake-utils"; - panfactum.url = "github:NixOS/nixpkgs/old-version"; + panfactum.url = "github:NixOS/nixpkgs/new-version"; }; ... }Run
nix flake update. This will update your lockfile and then download the new versions of all utilities.If you receive some warnings when your devShell reloads, run the recommended commands to update your repo files.
Update your Infrastructure
Update the
pf_stack_versionterragrunt variable in only your lowest environment level: 1environment: "development" - pf_stack_version: "old-version" + pf_stack_version: "new-version"Ensure that the terragrunt
versionfor that environment is set tolocalin order to deploy the local changes from step 1 (review these docs). 2Run
pf-tf-initin the environment’s Terragrunt directory to automatically upgrade yourmodule.yamland.terraform.lock.hclfiles for every module.On your local machine, run
terragrunt applyacross all modules in that environment. You can runterragrunt run-all applyto update all modules at once. 3Check to ensure that the environment is functioning as expected.
Once you are satisfied, cut a new release of your stack repository indicating you have updated the Panfactum version.
Repeat step 2-5 for all environments in sequence, testing each environment before moving on to the next. For step 3, set the
versionto the release ref that you created in step 6.