Skip to content

OCPBUGS-63307: Fix image policy event intervals and bookkeeping#30991

Open
haircommander wants to merge 1 commit intoopenshift:mainfrom
haircommander:image-policy-intervals
Open

OCPBUGS-63307: Fix image policy event intervals and bookkeeping#30991
haircommander wants to merge 1 commit intoopenshift:mainfrom
haircommander:image-policy-intervals

Conversation

@haircommander
Copy link
Copy Markdown
Member

@haircommander haircommander commented Apr 9, 2026

Assisted by Claude.

All of the other intervals are around 10 minutes. These events are triggered by MCP rollout, which happens for each of the image policy tests.
10 minutes is actually on the lower end for MCP rollout (which is given 20 minutes before timing out), but let's start with this and increase
in the future if necessary

Summary by CodeRabbit

  • Tests
    • Updated internal timing parameters for sigstore event pattern matching in test suite to enhance verification accuracy.

Note: This release contains internal testing improvements with no user-facing changes.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@haircommander: This pull request references Jira Issue OCPBUGS-63307, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Assisted by Claude.

There are two changes here, more details in each commit

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 342aa413-6a0f-4dbc-bec7-b7235b54b1d6

📥 Commits

Reviewing files that changed from the base of the PR and between 960bfdf and a2c00b9.

📒 Files selected for processing (1)
  • pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go

Walkthrough

Three Sigstore-related event matcher functions had their buffered overlap windows increased from ±30 seconds to ±30 minutes and a blank line was inserted after each Filter(...) call; no other logic changed.

Changes

Cohort / File(s) Summary
Overlap window adjustments
pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go
Updated three matcher functions (newConfigDriftMonitorStoppedTooOftenEventMatcher, newAddSigtermProtectionEventMatcher, newRemoveSigtermProtectionEventMatcher) to widen overlap windows from ±30 seconds to ±30 minutes by changing interval bound adjustments to ±time.Minute*30. Added a blank line after each Filter(...) call.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references a Jira ticket (OCPBUGS-63307) and mentions 'Fix image policy event intervals and bookkeeping', which directly aligns with the PR's main objectives: adjusting event buffer intervals for image policy monitoring and moving test cleanup into monitored intervals.
Stable And Deterministic Test Names ✅ Passed File is not a Ginkgo test file; contains no test declarations (It, Describe, Context, etc.).
Test Structure And Quality ✅ Passed PR modifies library code that defines event matchers for monitoring, not Ginkgo test code. Custom check for test structure requirements does not apply to infrastructure-level matcher configuration.
Microshift Test Compatibility ✅ Passed This PR modifies only timing intervals in existing event matchers, not adding new Ginkgo e2e tests, so MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests. Changes are confined to internal monitoring infrastructure code (duplicated_event_patterns.go) that adjusts buffer time intervals for event matchers.
Topology-Aware Scheduling Compatibility ✅ Passed This pull request does not introduce or modify deployment manifests, operator code, controllers, or scheduling constraints. Changes are limited to test utility library file adjustments with no scheduling constraints or topology-dependent configurations.
Ote Binary Stdout Contract ✅ Passed Modified file is a test support library with only type definitions, function definitions, and utility functions—no process-level code writing to stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. The changes exclusively modify the internal event monitoring library file duplicated_event_patterns.go to adjust timing windows for event matching logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from deads2k and sjenning April 9, 2026 19:35
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@cpmeadors
Copy link
Copy Markdown
Contributor

The increase the intervals commit looks good. Waiting on possible rework on the deferclean up commit.

@haircommander haircommander force-pushed the image-policy-intervals branch from 248685a to 46ee5b7 Compare April 9, 2026 20:34
@cpmeadors
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@haircommander: This pull request references Jira Issue OCPBUGS-63307, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Assisted by Claude.

All of the other intervals are around 10 minutes. These events are triggered by MCP rollout, which happens for each of the image policy tests.
10 minutes is actually on the lower end for MCP rollout (which is given 20 minutes before timing out), but let's start with this and increase
in the future if necessary

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@BhargaviGudi
Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@BhargaviGudi: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/a488aa10-34b9-11f1-9ef8-5eddfc43811b-0

@BhargaviGudi
Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@BhargaviGudi: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/b01b0170-34b9-11f1-8baa-b6739f6b7d46-0

@BhargaviGudi
Copy link
Copy Markdown
Contributor

BhargaviGudi commented Apr 10, 2026

Test case [Monitor:legacy-test-framework-invariants-pathological][sig-arch] events should not repeat pathologically is failing even with PR fix
periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@haircommander haircommander force-pushed the image-policy-intervals branch from 46ee5b7 to 960bfdf Compare April 10, 2026 17:45
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@haircommander
Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@haircommander: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/2d8c3cf0-3505-11f1-9adb-e9ec8aa322fd-0

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@QiWang19
Copy link
Copy Markdown
Member

I think maybe we need to increse the inverval to +/- 30min, above 4.21-e2e-azure-ovn-techpreview-serial test failure reason/ConfigDriftMonitorStopped Config Drift Monitor stopped (13:36:20Z) 13:36:20Z is about 27min after the last SigstoreImageVerification test finished.
And from 4.22 we have the longrunning test suite, we can move these tests to the suite [Suite:openshift/disruptive-longrunning][Disruptive] for 4.22+. Test running in this test suite ignores the events should not repeat pathologically monitor.

All of the other intervals are around 10 minutes. These events are triggered by MCP rollout, which happens for each of the image policy tests.
By observation, MCP rollouts can take upwards of 30 minutes, so we need to ignore for that duration

Signed-off-by: Peter Hunt <pehunt@redhat.com>
@haircommander haircommander force-pushed the image-policy-intervals branch from 960bfdf to a2c00b9 Compare April 13, 2026 16:41
@haircommander
Copy link
Copy Markdown
Member Author

updated @QiWang19

@openshift-ci-robot
Copy link
Copy Markdown

@haircommander: This pull request references Jira Issue OCPBUGS-63307, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (bgudi@redhat.com), skipping review request.

Details

In response to this:

Assisted by Claude.

All of the other intervals are around 10 minutes. These events are triggered by MCP rollout, which happens for each of the image policy tests.
10 minutes is actually on the lower end for MCP rollout (which is given 20 minutes before timing out), but let's start with this and increase
in the future if necessary

Summary by CodeRabbit

  • Tests
  • Updated internal timing parameters for sigstore event pattern matching in test suite to enhance verification accuracy.

Note: This release contains internal testing improvements with no user-facing changes.

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 openshift-eng/jira-lifecycle-plugin repository.

@QiWang19
Copy link
Copy Markdown
Member

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 13, 2026

@QiWang19: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/26713880-3758-11f1-836a-b96fda2dbbbb-0

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@QiWang19
Copy link
Copy Markdown
Member

Tests failed to install at https://pr-payload-tests.ci.openshift.org/runs/ci/26713880-3758-11f1-836a-b96fda2dbbbb-0, will trigger a rerun.
The code changes lgtm.

/lgtm

@QiWang19
Copy link
Copy Markdown
Member

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2026

@QiWang19: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d612edc0-3806-11f1-8913-39937e9c5160-0

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cpmeadors, haircommander, QiWang19
Once this PR has been reviewed and has the lgtm label, please assign bertinatto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@haircommander
Copy link
Copy Markdown
Member Author

/skip
/retest-required

@haircommander
Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2026

@haircommander: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-ci-4.21-e2e-azure-ovn-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/6648ed30-383a-11f1-8583-9f27bbce5451-0

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2026

@haircommander: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-csi a2c00b9 link true /test e2e-gcp-csi
ci/prow/e2e-vsphere-ovn a2c00b9 link true /test e2e-vsphere-ovn
ci/prow/e2e-aws-ovn-fips a2c00b9 link true /test e2e-aws-ovn-fips
ci/prow/e2e-vsphere-ovn-upi a2c00b9 link true /test e2e-vsphere-ovn-upi
ci/prow/e2e-gcp-ovn a2c00b9 link true /test e2e-gcp-ovn
ci/prow/e2e-metal-ipi-ovn-ipv6 a2c00b9 link true /test e2e-metal-ipi-ovn-ipv6

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@QiWang19
Copy link
Copy Markdown
Member

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-1of3
/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-2of3
/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-3of3

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 15, 2026

@QiWang19: trigger 3 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-1of3
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/379bc490-38d9-11f1-916c-1c6988fa2db6-0

AddSigtermProtectionIntervals[i].To = AddSigtermProtectionIntervals[i].To.Add(time.Second * 30)
AddSigtermProtectionIntervals[i].From = AddSigtermProtectionIntervals[i].From.Add(time.Second * -30)
AddSigtermProtectionIntervals[i].To = AddSigtermProtectionIntervals[i].To.Add(time.Minute * 30)
AddSigtermProtectionIntervals[i].From = AddSigtermProtectionIntervals[i].From.Add(time.Minute * -30)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
AddSigtermProtectionIntervals[i].From = AddSigtermProtectionIntervals[i].From.Add(time.Minute * -30)
AddSigtermProtectionIntervals[i].From = AddSigtermProtectionIntervals[i].From.Add(time.Second * -30)

I suggest we keep the From time as the original value, since we don't need such a long time window before the test run.

RemoveSigtermProtectionIntervals[i].To = RemoveSigtermProtectionIntervals[i].To.Add(time.Second * 30)
RemoveSigtermProtectionIntervals[i].From = RemoveSigtermProtectionIntervals[i].From.Add(time.Second * -30)
RemoveSigtermProtectionIntervals[i].To = RemoveSigtermProtectionIntervals[i].To.Add(time.Minute * 30)
RemoveSigtermProtectionIntervals[i].From = RemoveSigtermProtectionIntervals[i].From.Add(time.Minute * -30)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
RemoveSigtermProtectionIntervals[i].From = RemoveSigtermProtectionIntervals[i].From.Add(time.Minute * -30)
RemoveSigtermProtectionIntervals[i].From = RemoveSigtermProtectionIntervals[i].From.Add(time.Second * -30)

for i := range configDriftMonitorStoppedIntervals {
configDriftMonitorStoppedIntervals[i].To = configDriftMonitorStoppedIntervals[i].To.Add(time.Second * 30)
configDriftMonitorStoppedIntervals[i].From = configDriftMonitorStoppedIntervals[i].From.Add(time.Second * -30)
configDriftMonitorStoppedIntervals[i].To = configDriftMonitorStoppedIntervals[i].To.Add(time.Minute * 30)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It feels wrong that we would need so much grace here. I want to review the event and understand why from doesn't reflect firstTimestamp &/ why the code looking for overlap isn't using firstTimestamp

"message": {
                "reason": "AddSigtermProtection",
                "cause": "",
                "humanMessage": "Adding SIGTERM protection",
                "annotations": {
                    "count": "23",
                    "firstTimestamp": "2026-04-10T12:15:17Z",
                    "interesting": "true",
                    "lastTimestamp": "2026-04-10T13:45:34Z",
                    "pathological": "true",
                    "reason": "AddSigtermProtection",
                    "roles": "infra,worker"
                }
            },
            "from": "2026-04-10T13:45:34Z",
            "to": "2026-04-10T13:45:35Z"

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants