[BUG] - check_immutable_fields
leads to a version mismatch error when performing an upgrade
#2781
Labels
area:developer-experience 👩🏻💻
area: nebari-cli
impact: high 🟥
This issue affects most of the nebari users or is a critical issue
type: bug 🐛
Something isn't working
Describe the bug
In our latest release, we introduced a new function called check_immutable_fields, whose main goal is to assert that the user is not updating fields that would cause data destruction, such as changing the primary network storage mode from
efs
toceph
and vice versa.The function relies on a storage snapshot of the
nebari-config.yaml
preserved in the nebari state .tf file under the first stage (e.g for an AWS deployment it will be atstages/01-terraform-state/aws/terraform.tfstate
).This allows us to compare the config's "previous" state with the current version present in your local host.
However, recently, when doing an upgrade from AWS, I noticed that the function raised an error of version mismatch due to inconsistencies with the preserved version on the state and the upgraded version on the host. When inspecting the code, this becomes clearer since we are loading the previous state yaml config into the nebari schema, which has an underlying version check, which results in errors since the installed version has changed.
final expetion:
Right now, there is a workaround for manually updating the data of the preserved configuration under the state file or removing the file entirely, but a better solution is required. I propose adding a circumvention parameter to the schema loading to avoid triggering this error when loading "state" configurations.
Expected behavior
Depllying after upgraded should not lead to mistmacth version errors that are obscure to the user to diagnose. Deploying after upgrading should not lead to mismatched version errors that are obscure to the user's ability to analyze.
OS and architecture in which you are running Nebari
Linux
How to Reproduce the problem?
Command output
No response
Versions and dependencies used.
No response
Compute environment
AWS
Integrations
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: