Skip to content

[CI]: Prevent generator version bumps from landing with stale CRDs #603

Description

@loveRhythm1990

Is there an existing issue for this enhancement?

  • I searched the existing issues and did not find a duplicate.

Problem

PR #578 upgraded controller-gen from v0.15.0 to v0.16.0 but did not commit the regenerated CRD manifests. Running the v0.16.0 generator at merge commit 3de66ab changes 26 files under deploy/crds and charts/matrixone-operator/templates/crds, so make verify cannot leave a clean worktree.

The PR checks job failed, but the PR was still merged into main. PR #579 carried the same generator upgrade to the 1.2.0-alpha.5-hotfix branch.

Main was later repaired by PR #588, which regenerated the CRDs and explicitly identified stale generated output as one cause of the failing checks. The workflow should prevent this class of inconsistency from landing or remaining on another supported branch.

Reproduction

At commit 3de66ab with Go 1.23.1:

  1. Run make -C api manifests.
  2. Run git diff --exit-code.
  3. Observe changes in 26 generated CRD files.

Expected behavior

A generator version change must include all generated outputs, and a failing generated-file consistency check must block merge on protected branches.

Suggested work

  • Audit supported branches, especially 1.2.0-alpha.5-hotfix, for stale v0.16.0-generated CRDs.
  • Keep a focused generated-artifact consistency job in CI.
  • Make that job required by branch protection or merge queue policy.
  • Document the regeneration command next to generator version updates.

Acceptance criteria

  • Running the pinned generators on every supported branch leaves the worktree clean.
  • A deliberately stale generated file causes a required CI check to fail and prevents merging.
  • Generator upgrade PRs include regenerated CRDs and documentation outputs where applicable.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions