You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior A clear and concise description of what the bug is.
With the upgrade from v0.4.0 to v0.5.0 we had to manually specify type parameters for mocks that have been generated for type aliases that refer a generic interface with concrete types. Our type alias:
... the grpc.ServerStreamingServer is a generic interface.
The mock produced with v0.5.0 is:
// MockInboundGRPCToOutboundHTTPStream is a mock of InboundGRPCToOutboundHTTPStream interface.typeMockInboundGRPCToOutboundHTTPStream[Resany] struct {
ctrl*gomock.Controllerrecorder*MockInboundGRPCToOutboundHTTPStreamMockRecorder[Res]
isgomockstruct{}
}
while for v0.4.0 it was:
// MockInboundGRPCToOutboundHTTPStream is a mock of InboundGRPCToOutboundHTTPStream interface.typeMockInboundGRPCToOutboundHTTPStreamstruct {
ctrl*gomock.Controllerrecorder*MockInboundGRPCToOutboundHTTPStreamMockRecorder
}
we are also facing this issue, surprise to see no text added about this in the release note! whats the solution? is this just safe to just accept these changes and merge or any other solution.?
Actual behavior A clear and concise description of what the bug is.
With the upgrade from v0.4.0 to v0.5.0 we had to manually specify type parameters for mocks that have been generated for type aliases that refer a generic interface with concrete types. Our type alias:
... the
grpc.ServerStreamingServer
is a generic interface.The mock produced with v0.5.0 is:
while for v0.4.0 it was:
The mockgen command used is:
Expected behavior A clear and concise description of what you expected to
happen.
I would expect the mock struct to not need any type parameters and not to be generic.
To Reproduce Steps to reproduce the behavior
Here is the MR where we've done the upgrade: https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/merge_requests/1910
And here the commit that takes care of the breaking changes: https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/merge_requests/1910/diffs?commit_id=e513812928d97762306f8d83a280bbcf681fa94c
Additional Information
Triage Notes for the Maintainers
The text was updated successfully, but these errors were encountered: