OU-1389: remove default features from plugin-backend#1078
OU-1389: remove default features from plugin-backend#1078PeterYurkovich wants to merge 1 commit into
Conversation
|
@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. DetailsIn 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
WalkthroughContainer 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. ChangesExplicit Feature Selection
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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)DockerfileTraceback (most recent call last): Dockerfile.artTraceback (most recent call last): Dockerfile.devTraceback (most recent call last): Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/server/server_test.go (1)
37-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd 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
📒 Files selected for processing (5)
DockerfileDockerfile.artDockerfile.devpkg/server/server.gopkg/server/server_test.go
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1961979 to
4c7d960
Compare
|
/testwith openshift/cluster-monitoring-operator/main/e2e-agnostic-operator |
|
@PeterYurkovich: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/hold |
Summary by CodeRabbit
New Features
Bug Fixes
Tests