Closed marcm-ml closed 1 month ago
unfortunately the server does a lot of changes to the config you provide, you need to give full configs its unavoidable
I am not sure if I understand the output then. To me it seems that omitted values from a config file have different default values in the add and edit command, hence the diff output. Also when I look at the config of the stream after editing, it’s still the same config, e.g. max_consumer
is still -1
and not 0
which the edit command seem to suggest.
So the behavior is as I would expected where config file is merged with the current config of the stream on the server, but the output of the edit command is just wrong?
When a json file doesn’t have a value it’s zero. But we initialise many to -1 for infinite or unset.
But when you edit a stream the config given by you isn’t aware of this change and so it all differs.
The config given to edit isn’t seen as a patch. It rather as the full new config. And yours is missing all the fields we treated as default -1 and so you see this.
Ah okay, I think I got it. Thanks for clarifying
Observed behavior
When editing a stream, it shows config items to be changed which have not been changed. Furthermore, after editing, these supposedly changes are not applied to the actual stream.
Expected behavior
show actual changes
Server and client version
cli: 0.1.5 server: 2.10.21
Host environment
macOS-arm with docker but also on eks kubernetes cluster
Steps to reproduce
Start nats-server
create bare minimum stream config file:
create stream:
nats stream add --config config.json --json
givesedit stream:
nats stream edit --config config.json --force --json
which should not show any changes but outputs for me: