Closed lvaylet closed 2 years ago
I think we should maintain the backward compat for this one, so let's keep url
for now and we pass it as hosts
to the client. We should update our Elasticsearch docs a bit (can be done in a further PR probably) to specify that url
can be a single host (string
) or a set of hosts (list
).
About the unit tests, that's probably a good idea :) maybe split them in a further PR so that we fix the broken unit tests with this PR asap.
I'd rather not accumulate technical debt so I updated the docs in this PR. I created a separate issue for the unit tests: https://github.com/google/slo-generator/issues/227.
Thanks @ocervell for approving the changes. Do you expect me to go ahead and merge the PR myself? If so, which method should I use: "merge commit" or "squash and merge" (my preference)? If "squash and merge", are you happy with the commit message (i.e. the PR title)?
Thanks for catching this. I reused your suggested code, slightly updated it to handle missing keys on
dict.pop()
and added comments to make maintenance easier later on.Now does that mean that we should replace
url
withhosts
in the configuration files? Version 8.x.x of the client requires eitherhosts
orcloud_id
to be specified.Finally, should I write unit tests to cover all these scenarios (Elastic Cloud, basic auth, multiple nodes, API token...)?