Skip to content
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

Drop pkg/apihelper #1547

Closed
marquiz opened this issue Jan 17, 2024 · 0 comments · Fixed by #1561
Closed

Drop pkg/apihelper #1547

marquiz opened this issue Jan 17, 2024 · 0 comments · Fixed by #1561
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@marquiz
Copy link
Contributor

marquiz commented Jan 17, 2024

What would you like to be added:

Get rid of the pkg/apihelper package (and the related mocks) and replace it with direct usage of client(set) libraries.

This also means that the nfd-master unit tests need a major overhaul. Which is actually good as in their current form they are almost unmaintainable. E.g. error messages from the mock clients are practically indecipherable. Also, the current pattern of verifying that some specific set of k8s api calls, in particular order, with exact parameters, are made is very impractical if not pointless, and makes refactoring/modifying certain parts of the code very painful (and these are practically covered by the e2e tests).

Why is this needed:

Simplify code. Also uniformity accross the code base: many of the apiserver access (e.g. NFD API, NRT CRs) is already done directly, without resorting to apihelper.

@marquiz marquiz added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2024
@marquiz marquiz mentioned this issue Jan 24, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant