etcdbackend: support version auto discovery#2299
Conversation
|
Hi, i do not think the CI failure is relevant to this pr. |
|
Is rule #2 because you're concerned about breakages with existing data if the API level changes? |
|
Also, the failure is not related to this. I made a copypasta screwup when fixing tests because of a sad interaction between Go bugs and |
Yes, exactly. |
| } | ||
| } | ||
|
|
||
| func getEtcdAPIVersion(c client.Client) (string, error) { |
There was a problem hiding this comment.
Comments on this function as to how the version is computed might be helpful.
| if haEnabled == "" { | ||
| haEnabled = conf["ha_enabled"] | ||
| } | ||
| haEnabledBool, _ := strconv.ParseBool(haEnabled) |
There was a problem hiding this comment.
Can we catch the error here?
|
Agreed on Vishal's request to catch the ParseBool error (people do put strange things in config file) but after that we'll merge it. |
|
@jefferai I will clean up today or tomorrow, and ping you guys. Thanks a lot for reviewing it. |
|
@jefferai @vishalnayak fixed. PTAL! |
|
👍 |
Rule:
when api version is not defined by user:
when api version is provided by user, always trust user.
Manually tested.