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

fix: missing UDP field in checkType #14885

Merged
merged 3 commits into from Oct 5, 2022
Merged

Conversation

huikang
Copy link
Collaborator

@huikang huikang commented Oct 5, 2022

Description

Fix missing UDP field in builder, when the build parses the service definition file.

Testing & Reproduction steps

Refer to #14864

Links

Fix #14864

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

@huikang huikang added pr/no-changelog PR does not need a corresponding .changelog entry backport/1.13 Changes are backported to 1.13 backport/1.12 Changes are backported to 1.12 backport/1.11 labels Oct 5, 2022
@github-actions github-actions bot added the theme/config Relating to Consul Agent configuration, including reloading label Oct 5, 2022
@jkirschner-hashicorp
Copy link
Contributor

FYI @dhiaayachi - this is a small follow-up fix on top of #12722

Copy link
Contributor

@jkirschner-hashicorp jkirschner-hashicorp left a comment

Choose a reason for hiding this comment

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

@huikang : I love seeing 1-line PRs that fix an issue with a nice test :) thank you for this.

I'll defer to the engineering team on formally approving.

I feel like this bugfix deserves a changelog entry. Can you add one like this?

```release-note:bug
checks: Fixed a bug that prevented registration of UDP health checks from agent configuration files, such as service definition files with embedded health check definitions.
```

@@ -1562,6 +1562,7 @@ func (b *builder) checkVal(v *CheckDefinition) *structs.CheckDefinition {
Body: stringVal(v.Body),
DisableRedirects: boolVal(v.DisableRedirects),
TCP: stringVal(v.TCP),
UDP: stringVal(v.UDP),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see agent/config/builder.go mentioned in the developer docs that type to capture all the places that need to be checked for health check changes. Can you mention the config builder file? Maybe it can just be included in lines 4 and 5 (which both reference agent/config/config.go, which I think rely on this builder.go file).

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jkirschner-hashicorp , thanks. The doc is updated; please take a look.

@jkirschner-hashicorp jkirschner-hashicorp removed backport/1.11 backport/1.12 Changes are backported to 1.12 labels Oct 5, 2022
@jkirschner-hashicorp
Copy link
Contributor

Removed backports to 1.11 and 1.12. It seems the UDP health check functionality was first added in 1.13.0, per the changelog: https://github.com/hashicorp/consul/blob/main/CHANGELOG.md#1130-august-9-2022

@huikang huikang removed the pr/no-changelog PR does not need a corresponding .changelog entry label Oct 5, 2022
@huikang huikang added backport/1.14 Changes are backported to 1.14 and removed backport/1.14 Changes are backported to 1.14 labels Oct 5, 2022
@huikang huikang merged commit c1b5f34 into main Oct 5, 2022
@huikang huikang deleted the fix-missing-udp-field-builder branch October 5, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.13 Changes are backported to 1.13 theme/config Relating to Consul Agent configuration, including reloading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service UDP Check: TTL must be > 0 for TTL checks
3 participants