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

Group checkers by category #2083

Merged
merged 3 commits into from
Jan 15, 2019
Merged

Group checkers by category #2083

merged 3 commits into from
Jan 15, 2019

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 [email protected]

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 <[email protected]>
@siggy siggy added the area/cli label Jan 15, 2019
@siggy siggy self-assigned this Jan 15, 2019
Signed-off-by: Andrew Seigner <[email protected]>
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 <[email protected]>
@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