nats str edit cannot update Subject Transform
JulienVdG opened this issue · 2 comments
Observed behavior
nats str edit t --transform-source='t.*' --transform-destination='t.{{wildcard(1)}}.part.{{partition(3,1)}}'
Always return:
No difference in configuration
while nats str add t --transform-source='t.*' --transform-destination='t.{{wildcard(1)}}.part.{{partition(3,1)}}'
correctly set Subject Transform configuration (so the parameters are parsed correclty)
also nats str edit t --no-transform
correctly show the diff removing of the Subject Transform configuration and removes it.
Expected behavior
With a stream t without SubjectTransform configuration,
running nats str edit t --transform-source='t.*' --transform-destination='t.{{wildcard(1)}}.part.{{partition(3,1)}}'
should display:
Differences (-old +new):
api.StreamConfig{
... // 18 identical fields
Sources: nil,
Compression: s"None",
- SubjectTransform: nil,
+ SubjectTransform: &api.SubjectTransformConfig{Source: "t.*", Destination: "t.{{wildcard(1)}}.part.{{partition(3,1)}}"},
RePublish: nil,
Sealed: false,
... // 9 identical fields
}
Server and client version
nats-server version: 2.10.11
nats cli version: 0.1.3
Host environment
No response
Steps to reproduce
nats str add t --transform-source='t.' --transform-destination='t.{{wildcard(1)}}.part.{{partition(3,1)}}' --subjects='t.>'
nats str edit t --no-transform
nats str edit t --transform-source='t.' --transform-destination='t.{{wildcard(1)}}.part.{{partition(3,1)}}'
Thanks a lot !