Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul 1.4.1 breaks compatibility with older versions of the API client. #5270

Closed
mkeeler opened this issue Jan 24, 2019 · 5 comments
Closed
Labels
type/bug Feature does not function as expected
Milestone

Comments

@mkeeler
Copy link
Member

mkeeler commented Jan 24, 2019

After releasing Consul 1.4.1 we discovered that there were problems with Nomad's integration with Consul. After further digging we discovered a couple problems.

The symptom of the problem first manifest themselves with the api.Agent.Checks function of previous versions of the API client being unable to decode the JSON responses coming back from Consul. The root cause of this was that in 1.4.1 Consul was now sending back some empty strings for the time.Duration fields in the HealthCheckDefinition struct. Previously if the fields were empty they were not omitted. On the client side, the empty strings were unable to be decoded into the time.Duration values.

The fix for the first problem will be to omit those empty string fields just as we did before.

As we looked into this issue we found a secondary issue which was that the types of the fields in the 1.4.1 API client had been changed from an api.ReadableDuration to a raw time.Duration. As this could cause issues with consumers of the API client, the change will be reverted to maintain compatibility with older versions.

@mkeeler mkeeler added the type/bug Feature does not function as expected label Jan 24, 2019
@mkeeler mkeeler added this to the 1.4.2 milestone Jan 24, 2019
@mkeeler mkeeler changed the title Consul 1.4.1 break compatibility with older versions of the API client. Consul 1.4.1 breaks compatibility with older versions of the API client. Jan 24, 2019
@memelet
Copy link

memelet commented Jan 25, 2019

I am literally half way thru the upgrade to 1.4.1 and we use nomad as well. Should I roll back to 1.4.0?

@pearkes
Copy link
Contributor

pearkes commented Jan 25, 2019

@memelet Yes, you should stay on 1.4.0. There are some bugs fixed in 1.4.0 but they may or may not affect you. If you were already successfully running 1.4.0 I'd recommend that. If you were running 1.3.x I would recommend staying on that version until 1.4.2 next week.

@memelet
Copy link

memelet commented Jan 25, 2019

I was coming up from 1.2.0. I've already downgraded one cluster to 1.4.0. Doing the second now. The production cluster can remain at 1.2.0 until next week. Thanks!!

@pearkes
Copy link
Contributor

pearkes commented Jan 28, 2019

This is fixed in #5276 and is part of 1.4.2, which has been released.

@pearkes pearkes closed this as completed Jan 28, 2019
@robloxrob
Copy link

This fix worked for me. Thank you for the rapid turn around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

No branches or pull requests

4 participants