esque
esque copied to clipboard
`apply` doesn't consider cluster defaults when settings are changed
Example case:
Cluster default retention is 100ms
Create topic with retention of 50ms (ex. via esque apply)
Specify no retention for this topic in a config
Change the topic based on the config with esque apply
Expected: esque apply
shows the change as "50ms -> 100ms" and applies this correctly when confirming
Actual: esque apply
doesn't show the change. Not sure if it's applied correctly.
Notes:
This relates to the fact that we ignore None
values for the new changes in AttributeDiffs. Instead, we should treat None
values as ClusterDefault for this setting
.
If we simply show the None
, we'd get a diff for EVERYTHING that we haven't specified.
To solve, we need to do the following in the case that the new value is None: IF old_val IS NOT cluster_default THEN show change as old_val -> cluster_default
and IF old_val IS cluster_default THEN show no change
.
Open questions:
How do we get the cluster defaults?
What happens if we submit a None
setting to the client when we change a topic? Will it revert to the cluster default? I'd assume yes, but this should also be tested (ideally as part of the test suite, I don't trust any of the clients to not have regressions on this at some point).