This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
Enhance maintainability of operator common module #54
Labels
Comments
Issue-Label Bot is automatically applying the labels:
Please mark this comment with 👍 or 👎 to give our bot feedback! |
1 similar comment
Issue-Label Bot is automatically applying the labels:
Please mark this comment with 👍 or 👎 to give our bot feedback! |
@Jeffwan Thanks for sharing the detailed plan! The list of suggested enhancements makes sense to me. We can review the details in PRs. |
georgkaleido
pushed a commit
to georgkaleido/common
that referenced
this issue
Jun 9, 2022
* Add test_backgrounds * Add test_channels, test_color_consistency, test_color_spaces * Add test_dpi, test_fail, Fix tests * Add test_crop * Add test_format * Add test_orientation * Add test_position * Add test_roi * Add test_scale * Add test_semitransparent * Add test_serialops * Add test_shadow * Add test_transparent_color * Add test_type * Update requirements to include core server tester * Update conftest.py * Add test_size * Add twine circleci dependency * Update requirements * Update readme on how to run tests * Update readme, Use core test utils * Update requirements after rebase * Fix readme * Fix yaml danger stuff Co-authored-by: Paul Angerer <dabauxi@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There're few issues in current project and I propose to have some improvements for these issues.
I am in progress of a PR and please share some insights and feedbacks.
./hack/update-codegen
doesn't work with current code structure. It tries to generate outputs foroperator:v1
but project only havejob_controller/api/v1
directory which doesn't match.common/hack/update-codegen.sh
Lines 34 to 35 in 88a0cd0
Either the
update-codegen
or code structure need to be changed.There's no
./hack/verify-codegen.sh
codegen verify process in the CI.code-generator version referenced in the project doesn't work. The minimum version to support go mod is 0.15.x
https://github.com/kubeflow/common/blob/88a0cd071cf162120aa3ea0c3cb9cc64d69ef3f5/hack/update-codegen.sh#L25
Upgrade Kubernetes dependency.
common project uses expectation which belongs to
k8s.io/kubernetes
which makes it has direct dependency on it.common/job_controller/api/v1/controller.go
Line 83 in 88a0cd0
We should start to consider to remove dependency of
k8s/kubernetes
because it is not primarily intended to be consumed as a module. Only the published subcomponents are. reference: Delete direct dependency of kubernetes #48The other challenge is most of the new training operators may use kubebuilder2 or latest operator-sdk to generate APIs. These framework depends on latest
k8s.io/code-generater
andk8s.io/client-go
which has conflicts with the onesk8s.io/kubernetes@1.11
uses. There're some breaking changes user have to resolve.It would be better to upgrade to 1.15+ for all
k8s.io/xx
dependencies and make sure our common package is compatible with newer client-go.job_controller
, I think we plan to haveControllerInterface
and common codes under this package, As I know, some users only use api likeCleanupPolicy
orRestartPolicy
, etc. It would be great to separate api definition and jobcontroller implementation in different folders.For test_job, seems this is only used for testing and I think it's fine to put apis and client under pkg directly. I am ok to have a separate top level directory like
test_job
to host apis. Currently we have this codes structure for test_job.Based on what we talked above, could we create a project architecture like this
For other operators, they can import package api and controller packages like following.
Please leave some comments, I will file the PR if it makes sense.
/cc @terrytangyuan @gaocegege @jian-he @richardsliu
The text was updated successfully, but these errors were encountered: