add samples for CRDs, so that operator-sdk can build valid bundle.#58
Conversation
Signed-off-by: Haoyu Sun <hasun@redhat.com>
📝 WalkthroughWalkthroughThis PR adds a complete set of sample YAML manifests for the OpenShift Agentic operator API, demonstrating configuration and usage patterns for the agentic.openshift.io/v1alpha1 resource types, along with a Kustomization file to bundle them for deployment. ChangesSample Manifests and Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
config/samples/agentic_v1alpha1_verificationresult.yaml (1)
3-5: ⚡ Quick winAdd correlation label for realistic sample.
The controller creates VerificationResult resources with a
agentic.openshift.io/proposallabel for discovery and correlation. Including this label would make the sample more realistic and functional.📋 Proposed enhancement
metadata: name: fix-crashloop-0 namespace: openshift-lightspeed + labels: + agentic.openshift.io/proposal: fix-crashloop spec:As per relevant code snippet from controller/proposal/results.go:159-204 and test/e2e/verification_test.go:53-63, the label is used for listing VerificationResults by proposal.
🤖 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 `@config/samples/agentic_v1alpha1_verificationresult.yaml` around lines 3 - 5, The sample is missing the correlation label the controller expects; add a metadata.labels entry with key "agentic.openshift.io/proposal" and value equal to the proposal name (e.g., the metadata.name "fix-crashloop-0") so VerificationResult listing by proposal will work; see the controller logic in controller/proposal/results.go and the e2e usage in test/e2e/verification_test.go for where that label is required.
🤖 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 `@config/samples/agentic_v1alpha1_proposal.yaml`:
- Around line 10-15: The proposal sample references undefined agents: change
analysis.agent and verification.agent from "smart" and "fast" to the existing
"default" agent (or alternatively add matching Agent samples named "smart" and
"fast"); locate the keys analysis.agent, execution.agent, and verification.agent
in agentic_v1alpha1_proposal.yaml and either replace their values with "default"
to match agentic_v1alpha1_agent.yaml or add new Agent sample manifests named
"smart" and "fast" that match the existing Agent CRD so the references resolve.
---
Nitpick comments:
In `@config/samples/agentic_v1alpha1_verificationresult.yaml`:
- Around line 3-5: The sample is missing the correlation label the controller
expects; add a metadata.labels entry with key "agentic.openshift.io/proposal"
and value equal to the proposal name (e.g., the metadata.name "fix-crashloop-0")
so VerificationResult listing by proposal will work; see the controller logic in
controller/proposal/results.go and the e2e usage in
test/e2e/verification_test.go for where that label is required.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f0e3edc3-dd13-4e5b-8e13-e0a9f131b6dc
📒 Files selected for processing (10)
config/samples/agentic_v1alpha1_agent.yamlconfig/samples/agentic_v1alpha1_analysisresult.yamlconfig/samples/agentic_v1alpha1_approvalpolicy.yamlconfig/samples/agentic_v1alpha1_escalationresult.yamlconfig/samples/agentic_v1alpha1_executionresult.yamlconfig/samples/agentic_v1alpha1_llmprovider.yamlconfig/samples/agentic_v1alpha1_proposal.yamlconfig/samples/agentic_v1alpha1_proposalapproval.yamlconfig/samples/agentic_v1alpha1_verificationresult.yamlconfig/samples/kustomization.yaml
| analysis: | ||
| agent: smart | ||
| execution: | ||
| agent: default | ||
| verification: | ||
| agent: fast |
There was a problem hiding this comment.
Proposal references agents (smart, fast) that aren't part of the samples.
Only the default Agent is defined (agentic_v1alpha1_agent.yaml). The analysis.agent: smart and verification.agent: fast references have no corresponding sample manifests, so applying these samples as a workflow would point at non-existent agents. Either reuse default for all stages or add smart/fast Agent samples.
Proposed alignment with the defined agent
analysis:
- agent: smart
+ agent: default
execution:
agent: default
verification:
- agent: fast
+ agent: default🤖 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 `@config/samples/agentic_v1alpha1_proposal.yaml` around lines 10 - 15, The
proposal sample references undefined agents: change analysis.agent and
verification.agent from "smart" and "fast" to the existing "default" agent (or
alternatively add matching Agent samples named "smart" and "fast"); locate the
keys analysis.agent, execution.agent, and verification.agent in
agentic_v1alpha1_proposal.yaml and either replace their values with "default" to
match agentic_v1alpha1_agent.yaml or add new Agent sample manifests named
"smart" and "fast" that match the existing Agent CRD so the references resolve.
|
@raptorsun: all tests passed! 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. |
Summary by CodeRabbit