Skip to content

Group checkers by category#2083

Merged
siggy merged 3 commits intomasterfrom
siggy/group-checkers-integration
Jan 15, 2019
Merged

Group checkers by category#2083
siggy merged 3 commits intomasterfrom
siggy/group-checkers-integration

Conversation

@siggy
Copy link
Member

@siggy siggy commented Jan 15, 2019

The linkerd check command organized the various checks via loosely
coupled category IDs, category names, and checkers themselves, all with
ordering defined by consumers of this code.

This change removes category IDs in favor of category names, groups all
checkers by category, and enforces ordering at the HealthChecker
level.

Part of #1471, depends on #2078.

Signed-off-by: Andrew Seigner siggy@buoyant.io

The linkerd check command organized the various checks via loosely
coupled category IDs, category names, and checkers themselves, all with
ordering defined by consumers of this code.

This change removes category IDs in favor of category names, groups all
checkers by category, and enforces ordering at the HealthChecker
level.

Part of #1471, depends on #2078.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
@siggy siggy added the area/cli label Jan 15, 2019
@siggy siggy self-assigned this Jan 15, 2019
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
Copy link
Contributor

@klingerf klingerf left a comment

Choose a reason for hiding this comment

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

⭐️ Huge improvement! This is awesome.

},
},
{
description: fmt.Sprintf("can create %ss", "ClusterRole"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there's no variable anymore, you can write this as:

Suggested change
description: fmt.Sprintf("can create %ss", "ClusterRole"),
description: "can create ClusterRoles",

},
},
{
description: fmt.Sprintf("can create %ss", "ClusterRoleBinding"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: fmt.Sprintf("can create %ss", "ClusterRoleBinding"),
description: "can create ClusterRoleBindings",

},
},
{
description: fmt.Sprintf("can create %ss", "Role"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: fmt.Sprintf("can create %ss", "Role"),
description: "can create Roles",

},
},
{
description: fmt.Sprintf("can create %ss", "RoleBinding"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: fmt.Sprintf("can create %ss", "RoleBinding"),
description: "can create RoleBindings",

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
@siggy siggy merged commit dacd881 into master Jan 15, 2019
@siggy siggy deleted the siggy/group-checkers-integration branch January 15, 2019 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants