Bump mockery to v2.53.7 to unbreak unit-test on Go 1.27 - #269
Merged
ack-prow[bot] merged 1 commit intoSep 8, 2026
Merged
Conversation
The unit-test job builds mockery from source with the CI image's Go, and test-infra moved that image to Go 1.27.1 in aws-controllers-k8s/test-infra#1084. mockery v2.53.3 pins golang.org/x/tools v0.30.0, whose go/packages predates Go 1.27 and cannot type-check its standard library, so `make mocks` fails before any test runs: building mocks for pkg/types ... internal error: package "k8s.io/apimachinery/pkg/apis/meta/v1" without types was imported from "github.com/aws-controllers-k8s/runtime/pkg/types" v2.53.7 pins golang.org/x/tools v0.49.0, which handles Go 1.27. Regenerate the mocks so the committed output matches the new version. The only content changes are the generated-by header and import grouping. This also drops mocks/pkg/types/resolved_reference_manager.go. Its ResolvedReferenceManager interface no longer exists in pkg/types, so mockery does not generate it and nothing references it; it survived only because the mocks target overwrites files rather than starting from a clean directory.
This was referenced Sep 8, 2026
Member
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gustavodiaz7722, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Description of changes:
unit-testis currently failing on every PR, including unmodifiedmain. Itfails in the
mockstarget, whichmake testdepends on, so no test runs:scripts/install-mockery.shbuilds mockery from source with whatever Go the CIimage provides, and aws-controllers-k8s/test-infra#1084 moved
go_versionfrom1.26.5 to 1.27.1 on 2026-09-02. mockery v2.53.3 pins
golang.org/x/tools v0.30.0, whosego/packagespredates Go 1.27 and cannottype-check its standard library, which is what produces the
without typesloader error.
The timeline matches: the last
unit-testrun before the image bump passed(PR #267, 2026-09-02T19:04Z), and runs after it fail.
v2.53.7 pins
golang.org/x/tools v0.49.0, which handles Go 1.27.The mocks are regenerated so the committed output matches the new version. The
only content changes are the generated-by header and import grouping — no mock
behaviour changes.
This also drops
mocks/pkg/types/resolved_reference_manager.go. ItsResolvedReferenceManagerinterface no longer exists inpkg/types, so mockerydoes not generate it and nothing references it. It survived because the
mockstarget overwrites files rather than starting from a clean directory, so a
make clean-mocks && make mockscycle would otherwise always leave the treedirty.
Testing
Reproduced and verified locally against both Go versions, building mockery from
source exactly as the job does:
make mocksUnder Go 1.27.1 with this change, all six mock sets generate and the full
go test ./...passes. I also confirmed v2.53.3 fails on unmodifiedmainunderGo 1.27.1, so this is not specific to any open PR.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.