Skip to content

OTA-1967: install: Drop Lightspeed CustomResourceDefinitions (Proposal, etc.)#1412

Open
wking wants to merge 2 commits into
openshift:mainfrom
wking:remove-lightspeed-custom-resource-definitions
Open

OTA-1967: install: Drop Lightspeed CustomResourceDefinitions (Proposal, etc.)#1412
wking wants to merge 2 commits into
openshift:mainfrom
wking:remove-lightspeed-custom-resource-definitions

Conversation

@wking

@wking wking commented Jun 24, 2026

Copy link
Copy Markdown
Member

These are now conveniently installed in test clusters via a quickstart script, so we can demo tech-preview Proposal creation with the agentic Lightspeed operator installed, without having to install the CRDs ourselves. Reverts 4936d65 (#1380). This adjusts the approach that 8520979 (#1387) had taken, by pushing CRD handling over to Lightspeed, instead of leaving the CVO on the hook to deploy Lightspeed's CRDs for them, now that the Lightspeed quickstart makes Lightspeed-manages-its-own-CRDs so easy.

Summary by CodeRabbit

  • Breaking Changes

    • Removed multiple Agent-related Custom Resource Definitions, including Agent, AnalysisResult, and LLMProvider. These resources can no longer be created or managed on existing clusters.
  • Tests

    • Updated end-to-end tests to check for CRD/API availability and skip related assertions when the required APIs aren’t present.
  • Chores

    • Adjusted the cluster-version-operator test payload to remove LightSpeed CRD installation coverage.
    • Marked an obsolete LightSpeed CRD-related test as ignored.

These are now conveniently installed in test clusters via [1], so we
can demo tech-preview Proposal creation with the agentic Lightspeed
operator installed, without having to install the CRDs ourselves.
Reverts 4936d65 (OTA-1965: Add Lightspeed
CustomResourceDefinitions, 2026-04-21, openshift#1380).  This adjusts the
approach 8520979 (OTA-1967: Take official CRDs from the OpenShift
Lightspeed operator, 2026-05-08, openshift#1380) had taken, by pushing CRD
handling over to Lightspeed, instead of leaving the CVO on the hook to
deploy Lightspeed's CRDs for them, now that the Lightspeed quickstart
makes Lightspeed-manages-its-own-CRDs so easy.

[1]: https://github.com/openshift/lightspeed-agentic-operator/tree/main/hack/quickstart
@openshift-ci-robot

openshift-ci-robot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@wking: This pull request references OTA-1967 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:

These are now conveniently installed in test clusters via a quickstart script, so we can demo tech-preview Proposal creation with the agentic Lightspeed operator installed, without having to install the CRDs ourselves. Reverts 4936d65 (#1380). This adjusts the approach that 8520979 (#1387) had taken, by pushing CRD handling over to Lightspeed, instead of leaving the CVO on the hook to deploy Lightspeed's CRDs for them, now that the Lightspeed quickstart
makes Lightspeed-manages-its-own-CRDs so easy.

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 Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 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: Enterprise

Run ID: e5605e2e-a132-46ca-a075-85f7570c0676

📥 Commits

Reviewing files that changed from the base of the PR and between 59db086 and c069f8e.

📒 Files selected for processing (4)
  • .openshift-tests-extension/openshift_payload_cluster-version-operator.json
  • cmd/cluster-version-operator-tests/main.go
  • test/cvo/proposal.go
  • test/util/util.go
💤 Files with no reviewable changes (1)
  • .openshift-tests-extension/openshift_payload_cluster-version-operator.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/util/util.go
  • test/cvo/proposal.go

Walkthrough

Three LightSpeed CRD manifests were deleted, and the related proposal test path now skips CRD-dependent checks when the API is unavailable.

Changes

LightSpeed CRD removal and test updates

Layer / File(s) Summary
CRD manifest deletions
install/0000_00_cluster-version-operator_46_lightspeed-crd-agents.yaml, install/0000_00_cluster-version-operator_47_lightspeed-crd-analysisresults.yaml, install/0000_00_cluster-version-operator_47_lightspeed-crd-llmproviders.yaml
Removed the agents, analysisresults, and llmproviders CRD manifests.
API availability skip helper
test/util/util.go
Added a helper that creates an apiextensions client, checks for a named CRD, and skips when it is not found.
Proposal test and payload cleanup
cmd/cluster-version-operator-tests/main.go, .openshift-tests-extension/openshift_payload_cluster-version-operator.json, test/cvo/proposal.go
Removed the obsolete LightSpeed CRD test selection, dropped the standalone CRD presence test, and added an API skip guard before proposal creation checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning The new/updated Ginkgo code still has many bare Expect(err)/BeNil checks in setup and the API-skip helper, with little diagnostic context. Add contextual failure messages to the setup/helper assertions in test/cvo/proposal.go and test/util/util.go; keep the current timeouts and cleanup.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing Lightspeed CRDs from install manifests and related proposal handling.
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 All test names in the PR are stable and deterministic. The only new Ginkgo test is "should create proposals" which uses only static strings without pod names, timestamps, UUIDs, node names, or gene...
Microshift Test Compatibility ✅ Passed The new proposal test uses ClusterVersion/FeatureGates APIs, but the suite skips MicroShift in BeforeEach via util.SkipIfMicroshift, so it’s protected.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo tests were added; the remaining should create proposals test only checks APIs/namespace state and has no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The PR only removes LightSpeed CRDs and updates tests/guards; it adds no affinity, nodeSelector, replica, or topology-spread scheduling constraints.
Ote Binary Stdout Contract ✅ Passed Touched main/init/setup code has no stdout writes; the new SkipIfNoAPI helper is only called inside an It block, not process-level setup.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo tests were added; the remaining proposal test has no IPv4 assumptions and skips when network-restricted.
No-Weak-Crypto ✅ Passed The PR only removes CRDs and updates tests; touched Go files contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB usage or secret comparisons.
Container-Privileges ✅ Passed Touched files only delete CRDs and adjust tests; no added manifests contain privileged:true, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation.
No-Sensitive-Data-In-Logs ✅ Passed New/updated log sites only emit CRD names, cluster version, and AcceptRisks; no passwords, tokens, PII, or customer data are logged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026
@wking wking force-pushed the remove-lightspeed-custom-resource-definitions branch from 5c14a83 to 5687c39 Compare June 24, 2026 22:22
@hongkailiu

Copy link
Copy Markdown
Member

We have proposals used in e2e testing.
In my mind, it would not work without the CRD on the ephemeral cluster for e2e (we should see failures in the relevant e2e job of techpreview-serial. Note currently the test case is informing and thus we have to check the collected junit file to see the failure).
Is a quickstart script executed as a test step in CI somehow?

@jhadvig jhadvig left a comment

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.

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, wking

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

@jhadvig

jhadvig commented Jun 25, 2026

Copy link
Copy Markdown
Member

/hold

This PR removes the Lightspeed CRDs (Proposal, etc.) from CVO's install manifests, but the e2e test still expects them to be installed. The test needs to be updated or removed alongside the CRD removal.

@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 Jun 25, 2026
@jhadvig

jhadvig commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary: 6 of 8 failures are Azure install flakes. The 1 real failure is the Lightspeed CRDs e2e test that contradicts the PR's intent... the test asserts CRDs exist, but this PR deliberately removes them.

/retest

wking added a commit to wking/cluster-version-operator that referenced this pull request Jun 25, 2026
With 5687c39 (install: Drop Lightspeed CustomResourceDefinitions
(Proposal, etc.), 2026-06-24, openshift#1412) dropping our handling of those
CRDs, we need to adjust the test harness to:

* Stop asserting the CRDs are installed (that's no longer our job)
  and...
* Make our Proposal-handling testing conditional on someone else
  (e.g. a step in a CI job's configuration) having installed the
  Proposal CRD.

Avoids [1]:

  : [Jira:"Cluster Version Operator"] cluster-version-operator should install light speed CRDs correctly expand_less	0s
  {  fail [github.com/openshift/cluster-version-operator/test/cvo/proposal.go:95]: Expected
      <*errors.StatusError | 0xc000910c80>:
      customresourcedefinitions.apiextensions.k8s.io "proposals.agentic.openshift.io" not found

[1]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1412/pull-ci-openshift-cluster-version-operator-main-e2e-aws-ovn-techpreview/2069909194613460992
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@wking

wking commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

Hongkai:

...we should see failures in the relevant e2e job of techpreview-serial...

Good point; we were. I've pushed ed4e43c to address that (skipping the Proposal-handling testing if the CRD isn't installed. We should probably be setting up some kind of "serial with OLS installed" test-case for this repo, but I'm deferring that to OTA-1947.

@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

🤖 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 `@test/util/util.go`:
- Around line 153-164: Fix SkipIfNoAPI so it compiles and matches its callers:
in util.SkipIfNoAPI, use the passed restConfig when creating the apiextensions
client, declare err locally before checking it, and keep the CRD lookup/Skipf
logic unchanged. Also align the helper name with the call site in proposal.go by
either renaming SkipIfNoAPI to SkipIfNoProposalAPI or updating the caller to use
SkipIfNoAPI, and correct the doc comment typo in SkipIfNoAPI.
🪄 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: ca5b74ad-b34a-4e31-b996-a79c8eb39f2d

📥 Commits

Reviewing files that changed from the base of the PR and between 5687c39 and ed4e43c.

📒 Files selected for processing (3)
  • .openshift-tests-extension/openshift_payload_cluster-version-operator.json
  • test/cvo/proposal.go
  • test/util/util.go
💤 Files with no reviewable changes (1)
  • .openshift-tests-extension/openshift_payload_cluster-version-operator.json

Comment thread test/util/util.go Outdated
wking added a commit to wking/cluster-version-operator that referenced this pull request Jun 25, 2026
With 5687c39 (install: Drop Lightspeed CustomResourceDefinitions
(Proposal, etc.), 2026-06-24, openshift#1412) dropping our handling of those
CRDs, we need to adjust the test harness to:

* Stop asserting the CRDs are installed (that's no longer our job)
  and...
* Make our Proposal-handling testing conditional on someone else
  (e.g. a step in a CI job's configuration) having installed the
  Proposal CRD.

Avoids [1]:

  : [Jira:"Cluster Version Operator"] cluster-version-operator should install light speed CRDs correctly expand_less	0s
  {  fail [github.com/openshift/cluster-version-operator/test/cvo/proposal.go:95]: Expected
      <*errors.StatusError | 0xc000910c80>:
      customresourcedefinitions.apiextensions.k8s.io "proposals.agentic.openshift.io" not found

[1]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1412/pull-ci-openshift-cluster-version-operator-main-e2e-aws-ovn-techpreview/2069909194613460992
@wking wking force-pushed the remove-lightspeed-custom-resource-definitions branch from ed4e43c to 79c2211 Compare June 25, 2026 20:50
wking added a commit to wking/cluster-version-operator that referenced this pull request Jun 25, 2026
With 5687c39 (install: Drop Lightspeed CustomResourceDefinitions
(Proposal, etc.), 2026-06-24, openshift#1412) dropping our handling of those
CRDs, we need to adjust the test harness to:

* Stop asserting the CRDs are installed (that's no longer our job)
  and...
* Make our Proposal-handling testing conditional on someone else
  (e.g. a step in a CI job's configuration) having installed the
  Proposal CRD.

Avoids [1]:

  : [Jira:"Cluster Version Operator"] cluster-version-operator should install light speed CRDs correctly expand_less	0s
  {  fail [github.com/openshift/cluster-version-operator/test/cvo/proposal.go:95]: Expected
      <*errors.StatusError | 0xc000910c80>:
      customresourcedefinitions.apiextensions.k8s.io "proposals.agentic.openshift.io" not found

[1]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1412/pull-ci-openshift-cluster-version-operator-main-e2e-aws-ovn-techpreview/2069909194613460992
@wking wking force-pushed the remove-lightspeed-custom-resource-definitions branch from 79c2211 to 59db086 Compare June 25, 2026 20:50
Comment thread test/cvo/proposal.go
With 5687c39 (install: Drop Lightspeed CustomResourceDefinitions
(Proposal, etc.), 2026-06-24, openshift#1412) dropping our handling of those
CRDs, we need to adjust the test harness to:

* Stop asserting the CRDs are installed (that's no longer our job)
  and...
* Make our Proposal-handling testing conditional on someone else
  (e.g. a step in a CI job's configuration) having installed the
  Proposal CRD.

Avoids [1]:

  : [Jira:"Cluster Version Operator"] cluster-version-operator should install light speed CRDs correctly expand_less	0s
  {  fail [github.com/openshift/cluster-version-operator/test/cvo/proposal.go:95]: Expected
      <*errors.StatusError | 0xc000910c80>:
      customresourcedefinitions.apiextensions.k8s.io "proposals.agentic.openshift.io" not found

[1]: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-version-operator/1412/pull-ci-openshift-cluster-version-operator-main-e2e-aws-ovn-techpreview/2069909194613460992
@wking wking force-pushed the remove-lightspeed-custom-resource-definitions branch from 59db086 to c069f8e Compare June 26, 2026 20:59
@openshift-ci

openshift-ci Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@wking: 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-hypershift c069f8e link true /test e2e-hypershift

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

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.

4 participants