Skip to content

TRT-2618: Add env var support to selectively enable resource monitor tests and event collection#31420

Open
openshift-trt-agent[bot] wants to merge 7 commits into
openshift:mainfrom
openshift-trt:trt-2618
Open

TRT-2618: Add env var support to selectively enable resource monitor tests and event collection#31420
openshift-trt-agent[bot] wants to merge 7 commits into
openshift:mainfrom
openshift-trt:trt-2618

Conversation

@openshift-trt-agent

@openshift-trt-agent openshift-trt-agent Bot commented Jul 23, 2026

Copy link
Copy Markdown

Summary

TRT-2618: Add env var support to selectively enable resource monitor tests and event collection.

This PR adds two environment variables to control resource watch functionality, which is now disabled by default:

  • ENABLE_RESOURCE_MONITOR_TESTS — When set to true/1, enables resource monitor tests (pod-lifecycle, machine-lifecycle, node-lifecycle, clusteroperator-collector) and resource watching in the run-resourcewatch command.
  • ENABLE_RESOURCE_EVENT_COLLECTION — When set to true/1, enables the event-collector monitor test and event watching in the run-resourcewatch command.

Both default to disabled. Jobs can opt in to one or both independently. Values are parsed with strconv.ParseBool, so "true", "1", "TRUE" all enable, while "false", "0", "FALSE", or unset all disable.

Changes

  • pkg/defaultmonitortests/types.go: Gate pod-lifecycle, machine-lifecycle, node-lifecycle, and clusteroperator-collector behind ENABLE_RESOURCE_MONITOR_TESTS; gate event-collector behind ENABLE_RESOURCE_EVENT_COLLECTION.
  • pkg/resourcewatch/observe/source.go: Split resource list into monitor resources and event resources, filtered by the same env vars. Returns a no-op source when neither is set.
  • pkg/resourcewatch/operator/starter.go: Early return from RunResourceWatch when neither env var is set, avoiding unnecessary git storage initialization.
  • pkg/defaultmonitortests/types_test.go: Table-driven tests for monitor test registration gating with various env var values.
  • pkg/resourcewatch/observe/source_test.go: Table-driven tests for resource list filtering logic.

Test plan

  • go vet ./... passes
  • go test ./pkg/resourcewatch/... — all 8 tests pass (5 existing + 3 new source tests)
  • go test ./pkg/defaultmonitortests/... — all 8 test cases pass for env var gating
  • make build succeeds

Jira

TRT-2618


Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added boolean environment flags ENABLE_RESOURCE_MONITOR_TESTS and ENABLE_RESOURCE_EVENT_COLLECTION to independently control resource monitor tests and event collection.
    • Resource watch (run-resourcewatch) now starts only when at least one flag is enabled.
    • Improved boolean env-var parsing with safe defaults when unset/invalid (malformed values trigger a warning).
  • Bug Fixes
    • Standard resource monitoring no longer watches the Kubernetes events resource.
  • Tests
    • Added tests covering all flag combinations, including exact watch selection and monitor-test registration gating.
  • Documentation
    • Updated README with the new flags and their behavior.

openshift-trt and others added 3 commits July 16, 2026 14:07
…tests and event collection

Add ENABLE_RESOURCE_MONITOR_TESTS and ENABLE_RESOURCE_EVENT_COLLECTION
environment variables to control resource watch functionality. Both
default to disabled so resource watch remains off unless explicitly
opted in. Jobs can enable one or both independently.

ENABLE_RESOURCE_MONITOR_TESTS gates: pod-lifecycle, machine-lifecycle,
node-lifecycle, and clusteroperator-collector monitors.

ENABLE_RESOURCE_EVENT_COLLECTION gates: event-collector monitor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use strconv.ParseBool instead of != "" so that setting the env var to
  "0", "false", or "FALSE" correctly disables the feature.
- Group all resourceMonitorTestsEnabled() gated tests together in
  newUniversalMonitorTests instead of scattering them across the function.
- Add test cases for "0", "1", and "FALSE" env var values.
- Use t.Setenv for automatic cleanup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply ENABLE_RESOURCE_MONITOR_TESTS and ENABLE_RESOURCE_EVENT_COLLECTION
env vars to the run-resourcewatch command as well, so the resource watch
system is gated consistently with the monitor test framework. When neither
env var is set, RunResourceWatch returns immediately without initializing
git storage or starting watchers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown

@openshift-trt-agent[bot]: This pull request references TRT-2618 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

TRT-2618: Add env var support to selectively enable resource monitor tests and event collection.

This PR adds two environment variables to control resource watch functionality, which is now disabled by default:

  • ENABLE_RESOURCE_MONITOR_TESTS — When set to true/1, enables resource monitor tests (pod-lifecycle, machine-lifecycle, node-lifecycle, clusteroperator-collector) and resource watching in the run-resourcewatch command.
  • ENABLE_RESOURCE_EVENT_COLLECTION — When set to true/1, enables the event-collector monitor test and event watching in the run-resourcewatch command.

Both default to disabled. Jobs can opt in to one or both independently. Values are parsed with strconv.ParseBool, so "true", "1", "TRUE" all enable, while "false", "0", "FALSE", or unset all disable.

Changes

  • pkg/defaultmonitortests/types.go: Gate pod-lifecycle, machine-lifecycle, node-lifecycle, and clusteroperator-collector behind ENABLE_RESOURCE_MONITOR_TESTS; gate event-collector behind ENABLE_RESOURCE_EVENT_COLLECTION.
  • pkg/resourcewatch/observe/source.go: Split resource list into monitor resources and event resources, filtered by the same env vars. Returns a no-op source when neither is set.
  • pkg/resourcewatch/operator/starter.go: Early return from RunResourceWatch when neither env var is set, avoiding unnecessary git storage initialization.
  • pkg/defaultmonitortests/types_test.go: Table-driven tests for monitor test registration gating with various env var values.
  • pkg/resourcewatch/observe/source_test.go: Table-driven tests for resource list filtering logic.

Test plan

  • go vet ./... passes
  • go test ./pkg/resourcewatch/... — all 8 tests pass (5 existing + 3 new source tests)
  • go test ./pkg/defaultmonitortests/... — all 8 test cases pass for env var gating
  • make build succeeds

Jira

TRT-2618


Generated with Claude Code

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-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 23, 2026
@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 23, 2026
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Hi @openshift-trt-agent[bot]. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@openshift-ci
openshift-ci Bot requested a review from deads2k July 23, 2026 13:43
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-trt-agent[bot]
Once this PR has been reviewed and has the lgtm label, please assign dgoodwin 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

@openshift-ci
openshift-ci Bot requested a review from sjenning July 23, 2026 13:43
@smg247

smg247 commented Jul 23, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: e4712655-91ac-4b57-83c4-6ecaaaf9226c

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef5328 and 69f0be3.

📒 Files selected for processing (2)
  • pkg/monitortests/README.md
  • pkg/resourcewatch/observe/source.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/resourcewatch/observe/source.go

Walkthrough

Two environment variables independently gate resource monitor tests, watched resources, event collection, and resource-watch startup. Monitor and event resource selection are separated, with observer completion tracked for selected resources.

Changes

Resource observation feature gates

Layer / File(s) Summary
Flagged resource observation
pkg/resourcewatch/observe/source.go, pkg/resourcewatch/observe/source_test.go
Environment flags control monitor and event resource lists; event watching is isolated to the events resource, and selected observers are started and awaited.
Gated monitor registration
pkg/defaultmonitortests/types.go, pkg/defaultmonitortests/types_test.go
Lifecycle and collector monitor tests are conditionally registered, with table-driven coverage for flag combinations.
Startup gate and documentation
pkg/resourcewatch/operator/starter.go, pkg/monitortests/README.md
Startup returns before pipeline initialization when both feature flags are disabled, and the README documents the flags and parsing behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: sjenning, deads2k

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding env vars to selectively enable resource monitor tests and event collection.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PASS: The added test names and subtest titles are static strings; no runtime-generated or changing values appear in test titles.
Test Structure And Quality ✅ Passed PASS: The new tests are isolated table-driven unit tests with clear failure messages and no cluster resource lifecycle, cleanup, or timeout concerns.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the changes are unit tests and env-gated runtime code, with no MicroShift-unsupported test APIs found.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the new tests are plain Go unit tests, and the runtime changes only gate resource watchers by env vars.
Topology-Aware Scheduling Compatibility ✅ Passed Modified files only gate monitor registrations and resource watch startup via env vars; no deployments, affinities, nodeSelectors, replicas, or topology checks were added.
Ote Binary Stdout Contract ✅ Passed No new process-level stdout writes were added; the new logs use klog, which defaults to stderr, and no init/main/TestMain stdout writes appear in the touched code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the new tests are plain Go unit tests and contain no IPv4 or external connectivity assumptions.
No-Weak-Crypto ✅ Passed Touched files only add env-var gating and resource selection; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons found.
Container-Privileges ✅ Passed PR only changes Go/README files; no container/K8s manifests were modified, and no new privileged fields appeared in the diff.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The new log lines are generic status/warning messages and do not log raw env values, tokens, hostnames, PII, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment on lines +243 to +247
if resourceMonitorTestsEnabled() {
monitorTestRegistry.AddMonitorTestOrDie("pod-lifecycle", "Node / Kubelet", watchpods.NewPodWatcher())
monitorTestRegistry.AddMonitorTestOrDie("machine-lifecycle", "Cluster-Lifecycle / machine-api", watchmachines.NewMachineWatcher())
monitorTestRegistry.AddMonitorTestOrDie("clusteroperator-collector", "Test Framework", watchclusteroperators.NewOperatorWatcher())
}

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.

Can we get all the tests enabled by this marker in the same block? Is there a reason why

monitorTestRegistry.AddMonitorTestOrDie("node-lifecycle", "Node / Kubelet", watchnodes.NewNodeWatcher())

can't be in here too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done — moved node-lifecycle into the resourceMonitorTestsEnabled() block in newUniversalMonitorTests so all four gated tests are together.

Comment on lines +16 to +19
const (
EnvEnableResourceMonitorTests = "ENABLE_RESOURCE_MONITOR_TESTS"
EnvEnableResourceEventCollection = "ENABLE_RESOURCE_EVENT_COLLECTION"
)

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.

Is there a common place that these vars can live so they aren't duplicated?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done — removed the duplicated constants from types.go. The single source of truth is now observe.EnvEnableResourceMonitorTests and observe.EnvEnableResourceEventCollection in pkg/resourcewatch/observe/source.go. Both types.go and starter.go import from there. Also consolidated the strconv.ParseBool logic into a shared observe.ParseBoolEnv() helper that logs a warning for malformed values.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/defaultmonitortests/types.go`:
- Around line 82-89: Handle strconv.ParseBool errors consistently at
pkg/defaultmonitortests/types.go lines 82-89,
pkg/resourcewatch/observe/source.go lines 21-23, and
pkg/resourcewatch/operator/starter.go lines 20-24: surface or clearly log
malformed environment values before defaulting to disabled behavior, while
preserving intentional false handling. Add coverage for malformed boolean values
across the affected monitor registration, observation selection, and
run-resourcewatch paths.

In `@pkg/resourcewatch/observe/source_test.go`:
- Around line 91-100: Update TestEventResourcesContainOnlyEvents to compare
resources[0].GroupVersionResource against the existing eventsGVR value, rather
than checking only the Resource field. Keep the assertion that exactly one event
resource is returned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: b2433bed-e0d9-4572-abb6-cbb2d645afaf

📥 Commits

Reviewing files that changed from the base of the PR and between c73a0bb and cd760f6.

📒 Files selected for processing (5)
  • pkg/defaultmonitortests/types.go
  • pkg/defaultmonitortests/types_test.go
  • pkg/resourcewatch/observe/source.go
  • pkg/resourcewatch/observe/source_test.go
  • pkg/resourcewatch/operator/starter.go

Comment thread pkg/defaultmonitortests/types.go Outdated
Comment thread pkg/resourcewatch/observe/source_test.go
…rove assertions

- Move env var constants and ParseBool logic to a single ParseBoolEnv
  helper in pkg/resourcewatch/observe, removing duplication across
  types.go, source.go, and starter.go. Malformed values now log a
  warning instead of silently defaulting to false.
- Move node-lifecycle registration into the resourceMonitorTestsEnabled
  block in newUniversalMonitorTests alongside the other gated tests.
- Strengthen TestEventResourcesContainOnlyEvents to assert the full
  GroupVersionResource instead of just the Resource field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/resourcewatch/operator/starter.go (1)

19-24: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Make the disabled-state log describe the evaluated flags.

The variables may be set to false or an invalid value, so “neither ... is set” is misleading. Use wording such as “neither feature is enabled” instead.

Proposed fix
-		klog.Infof("Resource watch disabled: neither %s nor %s is set", observe.EnvEnableResourceMonitorTests, observe.EnvEnableResourceEventCollection)
+		klog.Infof("Resource watch disabled: neither resource monitor tests nor resource event collection is enabled")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/resourcewatch/operator/starter.go` around lines 19 - 24, Update the
disabled-state klog.Infof message in the starter initialization flow to describe
the evaluated monitorEnabled and eventEnabled flags, using wording such as
“neither feature is enabled” instead of implying the environment variables are
unset. Preserve the existing condition and return behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/resourcewatch/operator/starter.go`:
- Around line 19-24: Update the disabled-state klog.Infof message in the starter
initialization flow to describe the evaluated monitorEnabled and eventEnabled
flags, using wording such as “neither feature is enabled” instead of implying
the environment variables are unset. Preserve the existing condition and return
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e806705-1466-439a-931b-7981f288160f

📥 Commits

Reviewing files that changed from the base of the PR and between cd760f6 and 8fe869b.

📒 Files selected for processing (5)
  • pkg/defaultmonitortests/types.go
  • pkg/defaultmonitortests/types_test.go
  • pkg/resourcewatch/observe/source.go
  • pkg/resourcewatch/observe/source_test.go
  • pkg/resourcewatch/operator/starter.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/resourcewatch/observe/source_test.go
  • pkg/defaultmonitortests/types_test.go
  • pkg/resourcewatch/observe/source.go

…ed-state message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-trt-agent

Copy link
Copy Markdown
Author

Addressed the remaining CodeRabbit feedback in b9ff1a9:

  1. pkg/resourcewatch/operator/starter.go: Updated the disabled-state log message from "neither … is set" to "neither resource monitor tests nor resource event collection is enabled" — the vars may be set to false or an invalid value, so the old wording was misleading.
  2. pkg/resourcewatch/observe/source.go: Removed the raw env value (%q) from the ParseBoolEnv warning log to avoid leaking potentially sensitive data. The log now names only the env var.

@smg247

smg247 commented Jul 23, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 23, 2026
@smg247

smg247 commented Jul 24, 2026

Copy link
Copy Markdown
Member

@openshift-trt-agent, looks like the verify job is failing. Can you fix it?

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-trt-agent

Copy link
Copy Markdown
Author

Fixed in 2ef5328gofmt -s flagged a struct field alignment issue in source_test.go (extra spaces on name and wantEmpty fields in the first test case). make verify passes now.

@smg247

smg247 commented Jul 24, 2026

Copy link
Copy Markdown
Member

We need to document this behavior. I think it should go in pkg/monitortests/README.md. If there is a more appropriate place, put it there instead.

configResource("proxies"),
configResource("schedulers"),

// operator resources provide low level details about how what operators are doing

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.

you've removed a bunch of comments that you shouldn't have in code that wasn't even touched...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done — restored all the section-heading comments (// provide high level details of configuration..., // operator resources provide low level details..., // machine resources are required to..., etc.) that were inadvertently removed during the refactoring. Sorry about that.

@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

…ation

Restores section-heading comments in the resource list that were
inadvertently removed during refactoring, and adds documentation for the
ENABLE_RESOURCE_MONITOR_TESTS and ENABLE_RESOURCE_EVENT_COLLECTION
environment variable gating behavior to pkg/monitortests/README.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-trt-agent

Copy link
Copy Markdown
Author

Done — added documentation for the ENABLE_RESOURCE_MONITOR_TESTS and ENABLE_RESOURCE_EVENT_COLLECTION environment variable gating behavior to pkg/monitortests/README.md. The new section covers which monitor tests and resource watches each flag controls, valid boolean values, and how malformed values are handled. Also restored the section-heading comments in source.go that were inadvertently removed during refactoring.

@openshift-trt-agent

Copy link
Copy Markdown
Author

Regarding the failing e2e jobs: the failures are unrelated to this PR. The ci/prow/verify and ci/prow/unit jobs both pass. The e2e failures are caused by NetworkSegmentation/UDN test flakes and other unrelated issues (sig-auth SCC, sig-cli oc extraction). Zero monitor test failures across the runs.

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@openshift-trt-agent[bot]: 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-aws-csi 2ef5328 link true /test e2e-aws-csi
ci/prow/e2e-gcp-ovn 2ef5328 link true /test e2e-gcp-ovn
ci/prow/e2e-gcp-ovn-upgrade 2ef5328 link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-aws-ovn-fips 2ef5328 link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-serial-1of2 2ef5328 link true /test e2e-aws-ovn-serial-1of2
ci/prow/okd-scos-images 69f0be3 link true /test okd-scos-images
ci/prow/e2e-aws-ovn-serial-2of2 2ef5328 link true /test e2e-aws-ovn-serial-2of2

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.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants