-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
WIP : CI Signal Policy Violation: A DashboardTab config MUST CONTAIN an alert contact email address. #19286
Conversation
/uncc |
/retest |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: RobertKielty The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@RobertKielty: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@spiffxp @BenTheElder @kubernetes/ci-signal when y'all get a chance can you review this? I just fixed up the PR so that it is go fmt'd properly 🙄 apols for my numptyness! Can't remember why I marked this as WIP? Is this change useful/correct as-is or do we need to do more on this? The following run (on my feature branch) looks like ... Test output in config_tests.txt on the below local invocation is available for review here
No need for any of ^^^ that you can see the tests run on this PR. |
You can see the test in action on this PR of course :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions
// WIP See policy description on GH Issue #18599 | ||
func TestJobsMustHaveTestGridAlertsSetup(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the policy in #18599 is for all prow.k8s.io jobs, which is a subset of jobs that have results on testgrid.k8s.io:
- I would rename this to something like
TestKubernetesProwInstanceJobsMustHaveTestgridAlerts
- you could also consider folding this into
TestKubernetesProwInstanceJobsMustHaveMatchingTestgridEntries
above - iterating over dashboard -> tab is fine, but you should skip tabs whose testgroup isn't known to come from the kubernetes prow instance (see
prowGcsPrefix
usage above)
for _, dashboard := range cfg.Dashboards { | ||
for _, dashboardtab := range dashboard.DashboardTab { | ||
if dashboardtab.GetAlertOptions() == nil { | ||
t.Errorf("FAIL : %s : CI Signal Policy Violation: A DashboardTab config MUST CONTAIN an alert contact email address.", dashboardtab.GetName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also consider how to do progressive enforcement. Adding a test that fails everything right away is going to block unrelated work.
- for previous policies, I named the tests
Should
instead ofMust
, and didt.Logf
instead oft.Errorf
(you can also see something like this inTestReleaseBlockingJobsMustHaveTestgridDescriptions
below - we could also consider using a list of legacy exemptions, then setting a goal of driving that down to zero (see usage of
noPresubmitsInTestgridPrefixes
above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dashboard tab names are not unique. Consider instead logging dashboard/tab (see TestReleaseBlockingJobsMustHaveTestgridDescriptions
for an example)
// WIP subtest version - no real advantage ideally I would have liked subtests | ||
// to register as counted failures. AFAIK no idiomatic golang test way of | ||
// getting subtest stats. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% clear on this either, don't have time to dig in. However I feel like you could gather stats and log them if you'd like ("x / y failing policy") I also think test-case-per-dashboard means hundreds or thousands of tests, which probably wouldn't make sense unless each test covered all policies.
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Some WIP on CI Signal Alert Policy enforcement
CI Signal Policy Violation: A DashboardTab config MUST CONTAIN an alert contact email address.
Fixes #18599