Skip to content

Update Prometheus vendoring, adapt Cortex #668

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

Merged
merged 3 commits into from
Feb 5, 2018
Merged

Conversation

juliusv
Copy link
Contributor

@juliusv juliusv commented Jan 23, 2018

This is preparatory work for #622

The most noticeable change is around the lifecycle manager of the Alertmanager
notifier and its associated service discovery manager. This has now been moved
from the notifier package into main.go in Prometheus and thus we also need to
duplicate that lifecycle management ourselves.

@juliusv juliusv force-pushed the update-prom-vendoring branch from 7f3c4a8 to a1d4089 Compare January 23, 2018 13:38
@juliusv
Copy link
Contributor Author

juliusv commented Jan 23, 2018

(and some test updates still needed)

The most noticeable change is around the lifecycle manager of the Alertmanager
notifier and its associated service discovery manager. This has now been moved
from the notifier package into main.go in Prometheus and thus we also need to
duplicate that lifecycle management ourselves.
@juliusv juliusv force-pushed the update-prom-vendoring branch from ccf4ddb to dda18ca Compare February 5, 2018 07:29
@juliusv juliusv changed the title [WIP] Update Prometheus vendoring, adapt Cortex Update Prometheus vendoring, adapt Cortex Feb 5, 2018
@juliusv
Copy link
Contributor Author

juliusv commented Feb 5, 2018

Ok, tests updated and additionally verified that it still sends notifications in a real setup.

@jml Should be ready now.

Copy link
Contributor

@jml jml left a comment

Choose a reason for hiding this comment

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

I'm quite rusty post-vacation, but I think this is all good.

notifiers map[string]*rulerNotifier
}

type rulerNotifier struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a comment for this explaining what it is and why we want it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}
delay := 0 * time.Second // Unused, so 0 value is fine.
return rules.NewGroup("default", "none", delay, rs, opts), nil
}

// sendAlerts implements a the rules.NotifyFunc for a Notifier.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: s/a the/a/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jml jml merged commit e19107b into master Feb 5, 2018
@jml jml deleted the update-prom-vendoring branch February 5, 2018 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants