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

Handle updates of Service and Check definitions #498

Merged
merged 13 commits into from
Nov 25, 2015
Merged

Conversation

diptanu
Copy link
Contributor

@diptanu diptanu commented Nov 25, 2015

This PR handles syncing of Service and Check definitions more precisely

// 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)
Copy link
Contributor

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

@dadgar
Copy link
Contributor

dadgar commented Nov 25, 2015

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.

@diptanu
Copy link
Contributor Author

diptanu commented Nov 25, 2015

The data structures are already like that, and I agree the logic could be simplified.

@diptanu
Copy link
Contributor Author

diptanu commented Nov 25, 2015

We will have a followup PR for simplifying the code which tracks checks and services which are registered.

diptanu added a commit that referenced this pull request Nov 25, 2015
Handle updates of Service and Check definitions
@diptanu diptanu merged commit beebb7c into master Nov 25, 2015
@diptanu diptanu deleted the b-consul-check branch November 25, 2015 21:17
@github-actions
Copy link

github-actions bot commented May 2, 2023

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants