Repository navigation
ci: check generated code with the shared go-generated workflow (MK8S-516) - #92
Open
ezekiel-alexrod wants to merge 3 commits into
Open
ezekiel-alexrod wants to merge 3 commits into
ezekiel-alexrod wants to merge 3 commits into
Conversation
On a Renovate branch it also pushes the regenerated mocks, so a mockery bump no longer needs a human commit. Refs: MK8S-516
ezekiel-alexrod
requested review from
anthony-treuillier-scality and
eg-ayoub
November 19, 2026 16:28
Refs: MK8S-516
Refs: MK8S-516
anthony-treuillier-scality
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
go-generatejob is replaced by the sharedgo-generatedworkflow of scality/workflows. On a Renovate branch, it also pushes the regenerated mocks itself.Problem
When Renovate bumps mockery, the mocks change, so the
go-generatecheck fails until someone runsgo generate ./...and pushes on the Renovate branch. scality/raidmgmt#121 is the current example: mockery 3.9.1 renamesargstoargs1in a mock, and the PR stays red. 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.Review guide
.github/workflows/pre-merge.yamlonly, plus a line inCONTRIBUTING.md. The workflow is pinned by SHA on itsv2.13.0release, so Renovate updates it like our other pinned actions.What changes
go-generatebecomesgo-generated, which runsgo mod tidythengo generate ./...and fails on a diff, as before.renovate/*branch of this repo, it pushes the regenerated code as the App.Testing
go mod tidyandgo generate ./...onmainrenovate/test-go-generatedwith a stale mockeve-ci-cd[bot]) pushes 754cf6e, which restores it; the run on that commit passes, with no second pushOut of scope
gitIgnoredAuthorsin platform-renovate, so Renovate keeps updating a branch after the App commit (MK8S-516).Refs: MK8S-516