consul-rust icon indicating copy to clipboard operation
consul-rust copied to clipboard

KV put stores value with quotes

Open theirix opened this issue 1 year ago • 3 comments

Allows to put unmodified data to Consul KV. Currently written value is always quoted.

Closes #49

theirix avatar Nov 15 '22 20:11 theirix

Hello @theirix,

This is a very nice change (and it should have been done that way from scratch).

This is also unfortunately a breaking change for people relying on the old behavior for put.

So, I would just change this PR to add a new method (and mark the old one as deprecated) and keep put with existing behavior and marking it as deprecated.

Other possible change, we increase the version number semantically and explain in changelog this is a breaking change.

Regards

pierresouchay avatar Jan 05 '23 10:01 pierresouchay

Hello, @pierresouchay . Thank you for reviewing the PR. You are right, original KV::put should be kept for compatibility. I have added a new KV::put_raw for updated behaviour. Original KV::put can be used as a public API and in other modules like catalog where JSON serialization is needed (so no need in deprecation).

theirix avatar Jan 05 '23 14:01 theirix

Hi Pierre, Could this improvement be merged? It's backwards compatible, so we don't even need to break semantic versioning.

theirix avatar May 13 '24 19:05 theirix