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

api: Add Notes field to service checks #22397

Merged
merged 7 commits into from
Jun 10, 2024

Conversation

nicoche
Copy link
Contributor

@nicoche nicoche commented May 28, 2024

Resolves #21372

Copy link
Contributor

@pkazmierczak pkazmierczak left a comment

Choose a reason for hiding this comment

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

Hey @nicoche, thanks for the PR! Looks good! I left some minor comments, could you have a look? Also, would you add a changelog file? You can use the make cl command to generate it.

@@ -68,6 +68,7 @@ type ServiceCheck struct {
Interval time.Duration // Interval of the check
Timeout time.Duration // Timeout of the response from the check before consul fails the check
InitialStatus string // Initial status of the check
Notes string // Specifies arbitrary information for humans. This is not used by Consul internally
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we could add a little validation on this field? Maybe we could at least limit the length of notes to 250 characters? There's already a method for validating Consul fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, pushed a fix

command/alloc_status.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pkazmierczak pkazmierczak left a comment

Choose a reason for hiding this comment

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

thanks @nicoche, I just left some minor comments.

nomad/structs/services.go Outdated Show resolved Hide resolved
nomad/structs/services_test.go Outdated Show resolved Hide resolved
@pkazmierczak pkazmierczak changed the title Add Notes field to service checks api: Add Notes field to service checks Jun 10, 2024
@pkazmierczak pkazmierczak added backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.8.x backport to 1.8.x release line labels Jun 10, 2024
.changelog/22397.txt Outdated Show resolved Hide resolved
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM once @pkazmierczak's changes are addressed.

Co-authored-by: Piotr Kazmierczak <[email protected]>
@nicoche
Copy link
Contributor Author

nicoche commented Jun 10, 2024

Thanks guys for checking. @pkazmierczak accepted your suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.8.x backport to 1.8.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting Notes on consul health checks
3 participants