Hello Seldon Core team,
I've identified a confusing code structure in the operator's reconcilers that could be clarified.
Specifically:
- There are two directories, seldon and server, that both contain Go files belonging to package server.
- Both directories contain a file named service_reconciler.go, and they are different implementations.
- operator/controllers/reconcilers/seldon/service_reconciler.go (package server)
- operator/controllers/reconcilers/server/service_reconciler.go (package server)
This is unconventional and makes the code harder to navigate. Go convention dictates that the package name should match the directory name. The current structure, with two different files having the same name in the same package (but different directories), is a source of confusion.
It appears the reconcilers in the seldon directory manage the Seldon control plane components, while the ones in the server directory manage the user's model server deployments.
To improve clarity and adhere to Go conventions, I suggest refactoring this. For example, the package in operator/controllers/reconcilers/seldon/ could be renamed to seldon to match its directory, which would resolve the ambiguity.
This would make the controller logic much easier to understand and maintain.
Thanks!
Hello Seldon Core team,
I've identified a confusing code structure in the operator's reconcilers that could be clarified.
Specifically:
This is unconventional and makes the code harder to navigate. Go convention dictates that the package name should match the directory name. The current structure, with two different files having the same name in the same package (but different directories), is a source of confusion.
It appears the reconcilers in the seldon directory manage the Seldon control plane components, while the ones in the server directory manage the user's model server deployments.
To improve clarity and adhere to Go conventions, I suggest refactoring this. For example, the package in operator/controllers/reconcilers/seldon/ could be renamed to seldon to match its directory, which would resolve the ambiguity.
This would make the controller logic much easier to understand and maintain.
Thanks!