Skip to content

Commit

Permalink
fix: allow updating diskSelector option
Browse files Browse the repository at this point in the history
Looks like `cmp.Diff` needs to have `AllowUnexported` option for
types with unexported fields if you want to avoid panic when you compare them.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
  • Loading branch information
Unix4ever committed Aug 26, 2021
1 parent 761ccaf commit da0f6e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *Runtime) CanApplyImmediate(b []byte) error {
}

if !reflect.DeepEqual(currentConfig, newConfig) {
diff := cmp.Diff(currentConfig, newConfig)
diff := cmp.Diff(currentConfig, newConfig, cmp.AllowUnexported(v1alpha1.InstallDiskSizeMatcher{}))

return fmt.Errorf("this config change can't be applied in immediate mode\ndiff: %s", diff)
}
Expand Down

0 comments on commit da0f6e7

Please sign in to comment.