Skip to content

ci: push the regenerated code on Renovate branches with go-generated (MK8S-516) - #82

Merged
ezekiel-alexrod merged 1 commit into
mainfrom
improvement/MK8S-516-go-generated
Nov 27, 2026
Merged

ezekiel-alexrod merged 1 commit into
mainfrom
improvement/MK8S-516-go-generated

Conversation

@ezekiel-alexrod

Copy link
Copy Markdown
Collaborator

The go-generated job of scality/workflows now runs in agent/. On a Renovate branch, it pushes the regenerated code itself.

Problem

Renovate bumps controller-tools here (CONTROLLER_TOOLS_VERSION in agent/Makefile). A new controller-gen changes the CRDs, so the test job fails on its tree check until someone runs make manifests generate and pushes on the Renovate branch. The shared workflow (scality/workflows#115, scality/workflows#117) runs the generators without a write token, then pushes the result with a GitHub App token in a separate job. It already did so on scality/loadbalancer-operator#129 for the same controller-tools bump.

This is also the first step of the automerge pilot on this repo: a Renovate PR must not need a human commit.

Review guide

.github/workflows/pre-merge.yaml, then one sentence in CONTRIBUTING.md. The workflow is pinned by SHA on its v2.13.0 release.

What changes

  • New go-generated job, with working-directory: agent: it runs go mod tidy, go generate ./... and make manifests generate, and fails on a diff. go mod tidy was not checked before.
  • On a renovate/* branch of this repo, it pushes the regenerated code as the App.
  • The tree check of the test job stays: it also covers go fmt.

Testing

Check Result
the three commands in agent/ on main (Go 1.27.4) no diff, bin/ ignored
push mode on a controller-gen bump, scality/loadbalancer-operator#129 the App pushed the CRD, the next run passed
not verified the push on this repo: it shows up on the next generator bump

Out of scope

  • Turning automerge on for this repo (MK8S-516).

Refs: MK8S-516

A controller-gen bump changes the CRDs, so its Renovate PR needed a
human commit. The shared workflow regenerates in agent/ and pushes it.

Refs: MK8S-516
@ezekiel-alexrod
ezekiel-alexrod merged commit 63174a4 into main Nov 27, 2026
15 checks passed
@ezekiel-alexrod
ezekiel-alexrod deleted the improvement/MK8S-516-go-generated branch November 27, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants