Skip to content

Support safe removal of deprecated fields in the same versionΒ #43

@tobiasgiese

Description

@tobiasgiese

Motivation

It would be useful to allow removal of deprecated fields without flagging them as breaking changes. In Kubernetes CRDs, deprecations are often indicated in the field description with Deprecated:. Recognizing this pattern can help reduce noise when checking for breaking changes and improve the developer experience.

Proposal

  • Add an option to treat fields whose description contains Deprecated: as safe to remove.
  • This could be controlled via a CLI flag (e.g., --allow-deprecated-removal) or configuration.
  • The default behavior should remain unchanged for backward compatibility.

Example

# Previous CRD
spec:
  oldField:
    type: string
    description: "Deprecated: use `newField` instead"
  currentField:
    type: integer

# New CRD
spec:
  currentField:
    type: integer

With this feature, removal of oldField would not be considered a breaking change.

Benefits

  • Reduces false positives when diffing CRDs.
  • Aligns with Kubernetes deprecation conventions.
  • Improves workflow for CRD maintainers when cleaning up deprecated fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions