-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Handle updates of Service and Check definitions #498
Conversation
// Remove the tracked services which tasks no longer references | ||
for serviceId, ts := range c.trackedServices { | ||
if !ts.IsServiceValid() { | ||
c.logger.Printf("[INFO] consul: Removing service: %s since the task doesn't have it anymore", ts.service.Name) |
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.
I would make this DEBUG
LGTM but I think we can simplify the logic. It is a bit hard to follow right now. I think we should have a task have a list of services which has a list of checks. Then you can do a two way diff on each of those objects recursively. |
The data structures are already like that, and I agree the logic could be simplified. |
We will have a followup PR for simplifying the code which tracks checks and services which are registered. |
Handle updates of Service and Check definitions
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR handles syncing of Service and Check definitions more precisely