-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use generated mocks in flyteadmin #6197
Use generated mocks in flyteadmin #6197
Conversation
Signed-off-by: Alex Wu <[email protected]>
Signed-off-by: Alex Wu <[email protected]>
Code Review Agent Run #36a7e2Actionable Suggestions - 14
Additional Suggestions - 10
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
Signed-off-by: Alex Wu <[email protected]>
Signed-off-by: Alex Wu <[email protected]>
Code Review Agent Run #ccbc98Actionable Suggestions - 0Review Details
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Tracking issue
Related to #149
Why are the changes needed?
FlyteAdmin currently relies on manually crafted mocks, which are cumbersome to maintain and extend for new interfaces. Switching to Mockery v2 generated mocks is a more efficient approach, eliminating repetitive boilerplate code and streamlining the development process.
What changes were proposed in this pull request?
This PR updates the mocks in flyteadmin/pkg/manager to use Mockery v2 generated mocks and includes modifications to the related test cases to ensure compatibility.
Check all the applicable boxes
Summary by Bito
This PR implements a comprehensive migration from manually written mocks to Mockery v2 generated mocks across the FlyteAdmin codebase, particularly in the manager package. The changes update mock implementations to use testify/mock package with generated interfaces, implementing EXPECT().Method() pattern. This modernization improves type safety, standardizes mock implementations, and reduces manual mock maintenance overhead.Unit tests added: False
Estimated effort to review (1-5, lower is better): 5