Empty set depends #2027

Merged
merged 2 commits into from Mar 16, 2017

Conversation

Projects
None yet
2 participants
@kylebrandt
Member

kylebrandt commented Feb 21, 2017

No description provided.

@kylebrandt kylebrandt requested a review from captncraig Feb 21, 2017

cmd/bosun/conf/rule/rule.go
@@ -630,7 +630,7 @@ func (c *Conf) loadAlert(s *parse.SectionNode) {
if err != nil {
c.error(err)
}
- if len(depTags.Intersection(tags)) < 1 {
+ if len(depTags.Intersection(tags)) < 1 && len(depTags) != 0 {

This comment has been minimized.

@captncraig

captncraig Mar 7, 2017

Contributor

I'd switch the order here.

@captncraig

captncraig Mar 7, 2017

Contributor

I'd switch the order here.

cmd/bosun/sched/check.go
@@ -614,7 +614,7 @@ func markDependenciesUnevaluated(events map[models.AlertKey]*models.Event, deps
continue
}
for _, dep := range deps {
- if dep.Group.Overlaps(ak.Group()) {
+ if dep.Group.Overlaps(ak.Group()) || len(dep.Group) == 0 {

This comment has been minimized.

@captncraig

captncraig Mar 7, 2017

Contributor

Switch conditions again.

@captncraig

captncraig Mar 7, 2017

Contributor

Switch conditions again.

@kylebrandt kylebrandt merged commit 709f2d2 into master Mar 16, 2017

3 checks passed

bosun All checks Passed!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@kylebrandt kylebrandt deleted the emptySetDepend branch Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment