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

Use the correct check duration fields when converting transaction ops #5553

Merged
merged 2 commits into from
Apr 2, 2019

Conversation

kyhavlov
Copy link
Contributor

This change fixes a bug in the HTTP endpoint for the transaction API where the health check definition struct wasn't being deserialized properly. In the custom unmarshaling logic here we write the value of Interval/Timeout/DeregisterCriticalServiceAfter to both the new and old fields (which is covered in the go client txn tests here), but the HTTP endpoint doesn't actually end up calling the custom unmarshaler because we decode the body of the request to a generic interface{}. To get around this, the change has the HTTP endpoint use the old field names instead, which will always be set if they're provided in the request.

Fixes #5477.

Copy link
Member

@hanshasselberg hanshasselberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kyhavlov kyhavlov merged commit c2da314 into master Apr 2, 2019
@kyhavlov kyhavlov deleted the txn-check-serialization branch April 2, 2019 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Param “Check Definition” of consul api "/v1/txn" did not changed ,when I use this api
2 participants