-
Notifications
You must be signed in to change notification settings - Fork 4.5k
enforce validation for missing service name in registration #22381
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
Conversation
Hey @markcampv, thank you for the contribution. Can you please add a changelog for this PR? ref |
Done! I've also added a backport label since this fix is currently needed for a customer on 1.20.5+ent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
📣 Hi @markcampv! a backport is missing for this PR [22381] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:
|
4 similar comments
📣 Hi @markcampv! a backport is missing for this PR [22381] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:
|
📣 Hi @markcampv! a backport is missing for this PR [22381] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:
|
📣 Hi @markcampv! a backport is missing for this PR [22381] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:
|
📣 Hi @markcampv! a backport is missing for this PR [22381] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description:
|
Description
Adds validation to the catalog register endpoint to ensure that a service name (
Service.Service
) is provided when registering a service. This prevents registrations with empty service names, which resulted in the Services page in the Consul UI being broken.If both
Service.ID
andService.Service
are empty, the API now returns an error message.Testing & Reproduction steps
TestCatalog_Register_RejectsMissingServiceName
incatalog_endpoint_test.go
Links
PR Checklist