Maintenance and fixes#1
Conversation
… prepared query operations. Updated dependencies. Added test for the catalog-services query.
jwkoelewijn
left a comment
There was a problem hiding this comment.
The query explain-prepared-query also changes by removing one level in the result hashmap.
Why was this changed? What problem is being solved by this?
What is the reason for this unwrapping? It does change the API quite significantly, so might at least get some explanation for the reason...
Also, this changes (especially the unwrapping of :body) makes our fork incompatible with the upstream version, which might be good to reflect somehow; either in the Readme, or by removing the link to the original project. If we choose to do the latter we might need to at least add an acknowledgement in the readme as well, indicating that this work was heavily influenced by the original project... Especially because this is a "open" fork of the original.
| ([conn {:as params}] | ||
| (consul-index conn :get [:catalog :datacenters] {:query-params params}))) | ||
| (-> (consul-index conn :get [:catalog :datacenters] {:query-params params}) | ||
| :body))) |
There was a problem hiding this comment.
From the PR description it is not clear why this is done...
There was a problem hiding this comment.
I will extend the explanation.
Co-authored-by: jwkoelewijn <janwillem.koelewijn@nedap.com>
…in-prepared-query operation. Explained why the catalog-services operation was changed.
|
I removed the unwrapping to keep consistency with the previous expected result of |
… with existing users
| ([conn query-id params] | ||
| (->> (consul conn :get [:query (.toString query-id) :execute] :query-params params) | ||
| :body | ||
| (cske/transform-keys csk/->kebab-case-keyword)))) |
| (-> (consul conn :get [:query (.toString query-id) :explain] {:query-params params}) | ||
| :body | ||
| :Query))) | ||
|
|
| ([conn {:keys [dc] :as params}] | ||
| (:body (consul-index conn :get [:catalog :services] {:query-params params})))) | ||
| ([conn {:as params}] | ||
| (shallow-nameify-keys (:body (consul conn :get [:catalog :services] {:query-params params}))))) |
There was a problem hiding this comment.
Maybe introduce threading here
|
|
||
| ### 0.7.4 | ||
|
|
||
| Fixed `catalog-services` query to provide a hashmap wher the keys are the service name. |
There was a problem hiding this comment.
| Fixed `catalog-services` query to provide a hashmap wher the keys are the service name. | |
| Fixed `catalog-services` query to provide a map indexed by service name. |
also fixes a typo :P
Fixes the
catalog-servicesquery, the parameters handling of prepared query operations and updates dependencies.The
catalog-servicesquery returned a hashmap with wrong keys (kebab-cased). The keys in the resulting hashmap are service names. Those service names would change with the kebab-case transformation, becoming names of services that doesn't exists.I.E.
service_api_v1_production->service-api-v-1-production.All changes are able to be streamed.