You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When partial state mode is enabled, then only key prefixes specified by SetPartial will be in the final state. This allows providers to return partial states for partially applied resources (when errors occur).
SetPartial adds the key to the final state output while in partial state mode. The key must be a root key in the schema (i.e. it cannot be "list.0").
If partial state mode is disabled, then this has no effect. Additionally, whenever partial state mode is toggled, the partial data is cleared.
In practice however, this functionality is of very limited usage as most errors will stop a dependency chain. Partial state writes would also represent the configuration passthrough values and not the API refreshed values usually calculated via re-reading after update. Also as noted above, the usage of d.SetPartial() without d.Partial() is extraneous.
Description
The
(helper/schema.ResourceData).Partial()
and(helper/schema.ResourceData).SetPartial()
functionality represents the following:In practice however, this functionality is of very limited usage as most errors will stop a dependency chain. Partial state writes would also represent the configuration passthrough values and not the API refreshed values usually calculated via re-reading after update. Also as noted above, the usage of
d.SetPartial()
withoutd.Partial()
is extraneous.This feels like it may be two checks:
d.Partial()
d.SetPartial()
Flagged Code
Passing Code
// Neither used :)
References
The text was updated successfully, but these errors were encountered: