Skip to content

Revert "Revert "NO-JIRA: Disable WatchList feature gate due to the missing support of Project watch"" - #751

Open
xueqzhan wants to merge 1 commit into
mainfrom
revert-681-revert-667-disable-watchlist
Open

Revert "Revert "NO-JIRA: Disable WatchList feature gate due to the missing support of Project watch""#751
xueqzhan wants to merge 1 commit into
mainfrom
revert-681-revert-667-disable-watchlist

Conversation

@xueqzhan

@xueqzhan xueqzhan commented Aug 11, 2026

Copy link
Copy Markdown

Reverts #681

/hold

testing for now. Please ignore.

Summary by CodeRabbit

  • Bug Fixes
    • Improved configuration observation reliability by consistently disabling the WatchList feature during observation.
    • Preserved existing feature-gate behavior and error reporting for other supported features.
    • Ensured WatchList is correctly represented among recognized feature gates.

@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: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@xueqzhan: This pull request explicitly references no jira issue.

Details

In response to this:

Reverts #681

/hold

testing for now. Please ignore.

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 openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 11, 2026
@xueqzhan

Copy link
Copy Markdown
Author

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

  • periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/45811cc0-95d8-11f1-8d48-8fc9baf84d76-0

@xueqzhan

Copy link
Copy Markdown
Author

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

  • periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/47cf0460-95d8-11f1-81e5-bb3713bcedaf-0

@xueqzhan

Copy link
Copy Markdown
Author

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

  • periodic-ci-openshift-release-main-ci-5.0-e2e-gcp-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/49ef4c50-95d8-11f1-9a5d-d6cfcee4acbb-0

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign gangwgr 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

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Walkthrough

The configuration observer now wraps its feature-gate accessor. The wrapper forces WatchList off, preserves accessor errors, delegates other feature checks, and ensures WatchList appears in the known-feature list.

Changes

Feature-gate override

Layer / File(s) Summary
Disable WatchList in the observer accessor
pkg/operator/configobservation/configobservercontroller/observe_config_controller.go
The observer imports feature-gate APIs and slice utilities. It wraps the accessor to disable WatchList, preserve errors, delegate other gates, and add WatchList to known features.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: reverting the previous revert to restore the WatchList feature-gate change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 The PR changes only one production Go file; the diff adds no Ginkgo test declarations or test titles, so no unstable test name is introduced.
Test Structure And Quality ✅ Passed The pull request changes only observe_config_controller.go and adds no Ginkgo test code, It blocks, resource setup, waits, or assertions for this check to assess.
Microshift Test Compatibility ✅ Passed The diff changes only observe_config_controller.go and adds no Ginkgo e2e tests or It/Describe/Context/When declarations; the MicroShift test check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The patch changes only observe_config_controller.go and adds no Ginkgo e2e tests or It/Describe/Context/When declarations, so SNO test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The diff only wraps feature-gate observation to disable WatchList; it adds no replicas, affinity, topology spread, node selectors, tolerations, or PDB settings.
Ote Binary Stdout Contract ✅ Passed The diff only adds a WatchList feature-gate wrapper. The changed file has no stdout, fmt, log, klog, or Ginkgo writes, and the OTE main is unchanged.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The patch changes only controller logic in one Go file; it adds no Ginkgo tests or test paths, so the IPv6/disconnected test check is not applicable.
No-Weak-Crypto ✅ Passed The only PR change wraps the WatchList feature gate. The added lines contain no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret-comparison logic.
Container-Privileges ✅ Passed The diff changes only a Go feature-gate wrapper. Added lines contain no privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation:true settings.
No-Sensitive-Data-In-Logs ✅ Passed The only changed file adds a WatchList feature-gate wrapper. The diff adds no logging calls or sensitive data, and downstream events contain only feature-gate names and states.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-681-revert-667-disable-watchlist

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

@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.

🧹 Nitpick comments (1)
pkg/operator/configobservation/configobservercontroller/observe_config_controller.go (1)

91-129: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add focused tests for the feature-gate wrapper.

Test error propagation, WatchList=false, delegation of other gates, and single insertion of WatchList into KnownFeatures. Include a case where the underlying gate does not list WatchList, and verify the observer emits WatchList=false.

🤖 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/operator/configobservation/configobservercontroller/observe_config_controller.go`
around lines 91 - 129, Add focused tests for
newFeatureGateAccessWithWatchListDisabled and featureGateWithWatchListDisabled
covering CurrentFeatureGates error propagation, forced WatchList=false,
delegation of non-WatchList gates, and KnownFeatures retaining exactly one
WatchList entry whether or not the underlying gate lists it. Include an
observer-level case with WatchList absent from the underlying gate and verify
the emitted feature gate value is false.
🤖 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.

Nitpick comments:
In
`@pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`:
- Around line 91-129: Add focused tests for
newFeatureGateAccessWithWatchListDisabled and featureGateWithWatchListDisabled
covering CurrentFeatureGates error propagation, forced WatchList=false,
delegation of non-WatchList gates, and KnownFeatures retaining exactly one
WatchList entry whether or not the underlying gate lists it. Include an
observer-level case with WatchList absent from the underlying gate and verify
the emitted feature gate value is false.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: bd67ee78-7792-4af9-b7c5-6b0c1377859b

📥 Commits

Reviewing files that changed from the base of the PR and between f730b48 and 1962325.

📒 Files selected for processing (1)
  • pkg/operator/configobservation/configobservercontroller/observe_config_controller.go

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants