mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Backport from 1.5.x: Ignore unknown check results on decode (#374)
This commit is contained in:
parent
065ca8fb3b
commit
e8c1c3a700
@ -3,6 +3,7 @@
|
|||||||
UPGRADE NOTES:
|
UPGRADE NOTES:
|
||||||
* The `cloud` and `remote` backends will no longer default to `app.terraform.io` hostname and will require the hostname to be explicitly specified ([#291](https://github.com/opentffoundation/opentf/pull/291));
|
* The `cloud` and `remote` backends will no longer default to `app.terraform.io` hostname and will require the hostname to be explicitly specified ([#291](https://github.com/opentffoundation/opentf/pull/291));
|
||||||
* The `login` and `logout` commands will no longer default to `app.terraform.io` hostname and will require the hostname to be explicitly provided as a command-line argument ([#291](https://github.com/opentffoundation/opentf/pull/291));
|
* The `login` and `logout` commands will no longer default to `app.terraform.io` hostname and will require the hostname to be explicitly provided as a command-line argument ([#291](https://github.com/opentffoundation/opentf/pull/291));
|
||||||
|
* prevent future possible incompatibility with states that include unknown `check` block result kinds. ([#355](https://github.com/opentffoundation/opentf/pull/355));
|
||||||
|
|
||||||
NEW FEATURES:
|
NEW FEATURES:
|
||||||
* `opentf test`: The previously experimental `opentf test` command has been moved out of experimental. This comes with a significant change in how OpenTF tests are written and executed.
|
* `opentf test`: The previously experimental `opentf test` command has been moved out of experimental. This comes with a significant change in how OpenTF tests are written and executed.
|
||||||
|
@ -525,7 +525,11 @@ func decodeCheckResultsV4(in []checkResultsV4) (*states.CheckResults, tfdiags.Di
|
|||||||
for _, aggrIn := range in {
|
for _, aggrIn := range in {
|
||||||
objectKind := decodeCheckableObjectKindV4(aggrIn.ObjectKind)
|
objectKind := decodeCheckableObjectKindV4(aggrIn.ObjectKind)
|
||||||
if objectKind == addrs.CheckableKindInvalid {
|
if objectKind == addrs.CheckableKindInvalid {
|
||||||
diags = diags.Append(fmt.Errorf("unsupported checkable object kind %q", aggrIn.ObjectKind))
|
// We cannot decode a future unknown check result kind, but
|
||||||
|
// for forwards compatibility we need not treat this as an
|
||||||
|
// error. Eliding unknown check results will not result in
|
||||||
|
// significant data loss and allows us to maintain state file
|
||||||
|
// interoperability in the 1.x series.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user