-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Notify alias checks when aliased service is [de]registered #8456
Conversation
@@ -1912,6 +1912,59 @@ func TestAgent_AliasCheck(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestAgent_AliasCheck_ServiceNotification(t *testing.T) { |
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.
if you comment out the patch, does this test fail?
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.
Yep this would fail. We only used to notify alias checks if checks were updated. Now we notify about changes to aliased services as well.
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
🍒✅ Cherry pick of commit d72f72d onto |
Currently when monitoring alias checks locally we have two mechanisms for updating the status of the alias check:
PR #7384 added a check so that alias health checks do not pass if the underlying service doesn't exist. However, we did not notify existing alias checks when services were added/removed. This means we could wait up to a minute to update the check status in these cases (per item 2 above).
This PR triggers an alias check notification when services are added or removed from local state.