[Bugfix] Add the missing Service TaggedAddresses and Check Type fields to Txn API#22164
[Bugfix] Add the missing Service TaggedAddresses and Check Type fields to Txn API#22164joelczou wants to merge 2 commits into
Conversation
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes 1 out of 2 committers have signed the CLA.
Have you signed the CLA already but the status is still pending? Recheck it. |
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
|
Would like to have |
|
closed this PR as I have raised another pr with the fix #22220 |
Description
Update: looks like there is an issue with API package unable to unmarshall TxnResult when the service has
TaggedAddressesset. This issue should be resolved first before this PR.Consul Transaction API Service Operation does not register the
TaggedAddressesfield in theAgentServicestruct that is sent from the client. Same with theTypefield in theHealthCheckstruct.Testing & Reproduction steps
txn.jsonTaggedAddressesand CheckTypeare not registered.Relevant Unit Test:
https://github.com/jzou-rbx/consul/blob/4d76a43dc6d0ad9dacd6079c7b34d128baad12c7/agent/txn_endpoint_test.go#L533
does not test for the
Typefield in a check.https://github.com/jzou-rbx/consul/blob/4d76a43dc6d0ad9dacd6079c7b34d128baad12c7/agent/txn_endpoint_test.go#L703 does not test for the
TaggedAddressesfield in a regular service.The test build after the PR now work properly to include these fields when submitting the same input above to the Transaction API.
PR Checklist