consul-api
consul-api copied to clipboard
Add a check-and-set to deleteKV without changing return type
The main dilemma with adding check-and-set to deleteKV is that all the delete KV methods return Response<Void>. Consequently we can't actually return whether the c-a-s worked. We can't change Response<Void> to Response<Boolean> without breaking a lot of existing code.
This just adds the capability for check-and-set but punts on the Response<Void> problem. If callers want to see if the delete succeeded, they'll have to do another getKV. However, this is the least invasive version of this change.
https://github.com/Ecwid/consul-api/issues/49
This intentionally doesn't attempt to mess with the return type in the hopes of making incremental progress. Of the four possible solutions I outlined, this is number 1.
The CI failure:
Could not GET 'https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.1.0/junit-jupiter-engine-5.1.0.pom'. Received status code 403 from server: Forbidden
@vgv any thoughts on approach?
@vgv Did you have a chance to look at this?
Hi, sorry for long response. I will look into PR this weekend.
Just curious if you had a chance to look at this or any opinions on the approach.
Hello! I am following up on this. Are there any concerns about this @vgv?