Skip to content

NO-ISSUE: config/v1alpha1: Drop (Cluster)ImagePolicy since the hard cut to v1#2760

Open
wking wants to merge 2 commits intoopenshift:masterfrom
wking:delete-v1alpha1-image-policy-dead-code
Open

NO-ISSUE: config/v1alpha1: Drop (Cluster)ImagePolicy since the hard cut to v1#2760
wking wants to merge 2 commits intoopenshift:masterfrom
wking:delete-v1alpha1-image-policy-dead-code

Conversation

@wking
Copy link
Member

@wking wking commented Mar 11, 2026

d1ee051 (#2384) hard cut from v1alpha1 to v1 back when the API was still TechPreviewNoUpgrade. This v1alpha1 Go has been dead code since then. Delete it, to avoid confusing folks who might see it and think it still matters somewhere (as set of people that included me up until a few hours ago ;).

@openshift-ci-robot
Copy link

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 Mar 11, 2026
@openshift-ci-robot
Copy link

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

Details

In response to this:

d1ee051 (#2384) hard cut from v1alpha1 to v1 back when the API was still TechPreviewNoUpgrade. This v1alpha1 Go has been dead code since then. Delete it, to avoid confusing folks who might see it and think it still matters somewhere (as set of people that included me up until a few hours ago ;).

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
Copy link
Contributor

openshift-ci bot commented Mar 11, 2026

Hello @wking! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@qodo-code-review
Copy link

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Remove v1alpha1 ImagePolicy and ClusterImagePolicy dead code

📦 Other

Grey Divider

Walkthroughs

Description
• Remove dead v1alpha1 ImagePolicy and ClusterImagePolicy types
• Clean up obsolete API definitions from hard cut to v1
• Eliminate confusion from unused API code references
Diagram
flowchart LR
  A["v1alpha1 API Types"] -->|Delete| B["ImagePolicy removed"]
  A -->|Delete| C["ClusterImagePolicy removed"]
  B --> D["Clean codebase"]
  C --> D
Loading

Grey Divider

File Changes

1. config/v1alpha1/types_cluster_image_policy.go Miscellaneous +0/-80

Delete ClusterImagePolicy v1alpha1 type definitions

• Deleted entire file containing ClusterImagePolicy struct definition
• Removed ClusterImagePolicySpec with scopes and policy configuration
• Removed ClusterImagePolicyStatus and ClusterImagePolicyList types
• Eliminated 80 lines of dead code from v1alpha1 API version

config/v1alpha1/types_cluster_image_policy.go


2. config/v1alpha1/types_image_policy.go Miscellaneous +0/-289

Delete ImagePolicy v1alpha1 type definitions

• Deleted entire file containing ImagePolicy struct definition
• Removed ImagePolicySpec, ImagePolicyStatus, and ImagePolicyList types
• Removed all supporting types including ImageScope, ImageSigstoreVerificationPolicy,
 PolicyRootOfTrust, and related validation structures
• Eliminated 289 lines of dead code from v1alpha1 API version

config/v1alpha1/types_image_policy.go


Grey Divider

Qodo Logo

@qodo-code-review
Copy link

qodo-code-review bot commented Mar 11, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: cb31bc33-92ed-457e-b0e5-c53a69f89d94

📥 Commits

Reviewing files that changed from the base of the PR and between d2c6c8d and 7b00e56.

⛔ Files ignored due to path filters (7)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**
📒 Files selected for processing (10)
  • config/v1alpha1/register.go
  • config/v1alpha1/tests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml
  • config/v1alpha1/tests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
  • config/v1alpha1/tests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml
  • config/v1alpha1/tests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
  • config/v1alpha1/types_cluster_image_policy.go
  • config/v1alpha1/types_image_policy.go
  • config/v1alpha1/zz_generated.deepcopy.go
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
  • config/v1alpha1/zz_generated.swagger_doc_generated.go
💤 Files with no reviewable changes (10)
  • config/v1alpha1/tests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
  • config/v1alpha1/types_cluster_image_policy.go
  • config/v1alpha1/tests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml
  • config/v1alpha1/register.go
  • config/v1alpha1/zz_generated.swagger_doc_generated.go
  • config/v1alpha1/tests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
  • config/v1alpha1/types_image_policy.go
  • config/v1alpha1/tests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml
  • config/v1alpha1/zz_generated.deepcopy.go

📝 Walkthrough

Walkthrough

This pull request removes the v1alpha1 API surface for image and cluster image policies: it deletes config/v1alpha1/types_cluster_image_policy.go and config/v1alpha1/types_image_policy.go, removes ImagePolicy/ClusterImagePolicy registrations in config/v1alpha1/register.go, deletes related autogenerated artifacts (zz_generated.deepcopy.go, zz_generated.swagger_doc_generated.go, zz_generated.featuregated-crd-manifests.yaml), and removes multiple test manifests under config/v1alpha1/tests/... (SigstoreImageVerification and PKI variants). The changes eliminate type definitions, deepcopy and swagger generation, CRD manifests, and associated tests for these policies.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing v1alpha1 (Cluster)ImagePolicy types that became dead code after the hard cut to v1.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for removing the v1alpha1 ImagePolicy dead code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed The pull request exclusively removes dead code type definitions that were left over after a hard cut from v1alpha1 to v1, with no test code modifications.
Test Structure And Quality ✅ Passed PR removes dead code (v1alpha1 type definitions) with no Ginkgo test files involved.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 11, 2026

[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 deads2k 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

@JoelSpeed
Copy link
Contributor

Will need to clean up things like deepcopy that are generated for this, and any testing that's specific to this API type

PROTO_OPTIONAL=1 make update

This should get you started there at least

@wking wking force-pushed the delete-v1alpha1-image-policy-dead-code branch from 2c75ec7 to d2c6c8d Compare March 13, 2026 22:25
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2026
@openshift-ci openshift-ci bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 13, 2026
wking added 2 commits March 13, 2026 15:56
d1ee051 (Add clusterimgepolicy/imagepolicy to payload, 2025-07-23, openshift#2384)
hard cut from v1alpha1 to v1 back when the API was still
TechPreviewNoUpgrade.  This v1alpha1 Go has been dead code since then.
Delete it, to avoid confusing folks who might see it and think it
still matters somewhere (as set of people that included me up until a
few hours ago ;).
Generated with:

  $ PROTO_OPTIONAL=1 make update
@wking wking force-pushed the delete-v1alpha1-image-policy-dead-code branch from d2c6c8d to 7b00e56 Compare March 13, 2026 23:09
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 13, 2026

@wking: all tests passed!

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants