Skip to content

OU-1389: remove default features from plugin-backend#1078

Open
PeterYurkovich wants to merge 1 commit into
openshift:mainfrom
PeterYurkovich:ou-1389-13
Open

OU-1389: remove default features from plugin-backend#1078
PeterYurkovich wants to merge 1 commit into
openshift:mainfrom
PeterYurkovich:ou-1389-13

Conversation

@PeterYurkovich

@PeterYurkovich PeterYurkovich commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Container deployments now start with alerting, metrics, legacy dashboards, and targets enabled via runtime flags.
  • Bug Fixes

    • Server startup now fails fast when no features are selected, instead of silently enabling defaults.
  • Tests

    • Updated server and TLS-related tests to explicitly configure the supported feature set.

@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 22, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 22, 2026

Copy link
Copy Markdown

@PeterYurkovich: This pull request references OU-1389 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 task to target the "5.0.0" version, but no target version was set.

Details

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

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

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: Enterprise

Run ID: d155d855-c73e-4e20-83db-0c3fb6bd6de3

📥 Commits

Reviewing files that changed from the base of the PR and between 1961979 and 4c7d960.

📒 Files selected for processing (5)
  • Dockerfile
  • Dockerfile.art
  • Dockerfile.dev
  • pkg/server/server.go
  • pkg/server/server_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
  • Dockerfile.dev
  • Dockerfile
  • Dockerfile.art
  • pkg/server/server.go
  • pkg/server/server_test.go

Walkthrough

Container entrypoints now pass four explicit feature flags to the backend. Server startup rejects empty feature selections instead of applying defaults, and server tests provide the shared feature configuration.

Changes

Explicit Feature Selection

Layer / File(s) Summary
Runtime feature arguments
Dockerfile, Dockerfile.art, Dockerfile.dev
All container entrypoints pass alerting,metrics,legacy-dashboards,targets to plugin-backend.
Server feature validation and test configuration
pkg/server/server.go, pkg/server/server_test.go
Server startup errors when no features are enabled, and server tests use a shared configuration enabling the four features.

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

Suggested reviewers: jgbernalp, zhuje

🚥 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 matches the main change: plugin-backend no longer auto-enables default features.
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 modified tests use static Go test names; no Ginkgo titles or dynamic/generated identifiers were added.
Test Structure And Quality ✅ Passed No Ginkgo tests or cluster-style waits were added; the touched Go tests keep per-test cleanup and no new structural/timeout issues were introduced.
Microshift Test Compatibility ✅ Passed The test changes are stdlib unit tests in pkg/server/server_test.go; no new Ginkgo e2e specs or unsupported OpenShift APIs/resources were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The PR only changes Dockerfiles and pkg/server unit tests; no new Ginkgo e2e tests or SNO-sensitive multi-node assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only Dockerfile entrypoints and feature-gating logic changed; no manifests/controllers, affinity, node selectors, spread constraints, or replica logic were added.
Ote Binary Stdout Contract ✅ Passed No stdout writes were added in main/init/suite setup; startup code uses logrus defaults and the PR only changes feature flags/validation.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes unit tests and server startup; no new Ginkgo e2e tests or external-network calls were added, so this check is not applicable.
No-Weak-Crypto ✅ Passed Touched files only add feature gating and TLS test scaffolding; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret comparisons found.
Container-Privileges ✅ Passed No privileged flags were added; runtime stages still use USER 1001, and the only USER 0 entries are pre-existing build stages.
No-Sensitive-Data-In-Logs ✅ Passed Patch only changes feature defaults and Docker ENTRYPOINTs; no new logs or secret-bearing messages were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
Dockerfile

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

Dockerfile.art

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

Dockerfile.dev

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/server/server_test.go (1)

37-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for empty feature selections.

The new validation path is not tested. Add cases for an empty map and an all-disabled map so the explicit-selection contract remains covered.

🤖 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/server/server_test.go` around lines 37 - 42, Add regression cases in the
server tests covering an empty feature map and a map where every feature is
disabled, using defaultFeatures or the relevant validation test setup. Assert
the explicit-selection contract and expected validation results for both cases.
🤖 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/server/server.go`:
- Around line 110-112: Update the feature validation in the server startup path
to inspect the boolean values in cfg.Features, not just the map length. Allow
startup only when at least one feature value is true; otherwise return the
existing error for configurations with no enabled features.

---

Nitpick comments:
In `@pkg/server/server_test.go`:
- Around line 37-42: Add regression cases in the server tests covering an empty
feature map and a map where every feature is disabled, using defaultFeatures or
the relevant validation test setup. Assert the explicit-selection contract and
expected validation results for both cases.
🪄 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: Enterprise

Run ID: 5a063ece-0cd3-4bb4-8bad-bdecddc62072

📥 Commits

Reviewing files that changed from the base of the PR and between 0d670d3 and 1961979.

📒 Files selected for processing (5)
  • Dockerfile
  • Dockerfile.art
  • Dockerfile.dev
  • pkg/server/server.go
  • pkg/server/server_test.go

Comment thread pkg/server/server.go Outdated
@openshift-ci
openshift-ci Bot requested review from jgbernalp and zhuje July 22, 2026 14:49
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PeterYurkovich

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2026
@PeterYurkovich

Copy link
Copy Markdown
Contributor Author

/testwith openshift/cluster-monitoring-operator/main/e2e-agnostic-operator

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@PeterYurkovich: The following test 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-monitoring 4c7d960 link true /test e2e-monitoring

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.

@PeterYurkovich

Copy link
Copy Markdown
Contributor Author

/hold
waiting for CMO change to make it into CI/nightlys

@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 Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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