Ecwid / consul-api

Java client for Consul HTTP API
Apache License 2.0
416 stars 177 forks source link

Add a check-and-set to deleteKV without changing return type #202

Open Anusien opened 4 years ago

Anusien commented 4 years ago

The main dilemma with adding check-and-set to deleteKV is that all the delete KV methods return Response. Consequently we can't actually return whether the c-a-s worked. We can't change Response to Response without breaking a lot of existing code.

This just adds the capability for check-and-set but punts on the Response 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

Anusien commented 4 years ago

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.

Anusien commented 4 years ago

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

Anusien commented 4 years ago

@vgv any thoughts on approach?

Anusien commented 4 years ago

@vgv Did you have a chance to look at this?

vgv commented 4 years ago

Hi, sorry for long response. I will look into PR this weekend.

Anusien commented 3 years ago

Just curious if you had a chance to look at this or any opinions on the approach.

ParthKolekar commented 12 months ago

Hello! I am following up on this. Are there any concerns about this @vgv?