mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
12572e97bc
If an instance object in state has an earlier schema version number then it is likely that the schema we're holding won't be able to decode the raw data that is stored. Instead, we must ask the provider to upgrade it for us first, which might also include translating it from flatmap form if it was last updated with a Terraform version earlier than v0.12. This ends up being a "seam" between our use of int64 for schema versions in the providers package and uint64 everywhere else. We intend to standardize on int64 everywhere eventually, but for now this remains consistent with existing usage in each layer to keep the type conversion noise contained here and avoid mass-updates to other Terraform components at this time. This also includes a minor change to the test helpers for the backend/local package, which were inexplicably setting a SchemaVersion of 1 on the basic test state but setting the mock schema version to zero, creating an invalid situation where the state would need to be downgraded. |
||
---|---|---|
.. | ||
test-fixtures | ||
backend_apply_test.go | ||
backend_apply.go | ||
backend_local.go | ||
backend_plan_test.go | ||
backend_plan.go | ||
backend_refresh_test.go | ||
backend_refresh.go | ||
backend_test.go | ||
backend.go | ||
cli.go | ||
counthookaction_string.go | ||
hook_count_action.go | ||
hook_count_test.go | ||
hook_count.go | ||
hook_state_test.go | ||
hook_state.go | ||
local_test.go | ||
testing.go |