-
Notifications
You must be signed in to change notification settings - Fork 58
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
Consolidate code from catalogd/inernal in to operataor-controller/internal #1707
Comments
What is the target internal architecture we're looking to reach? Is the idea to move all catalogd/internal to operator-controller and have catalogd use dependencies from there meaning it would no longer have its own /internal? The RFC seems to be missing those details and IMO it's important to know the specific thought-out final structure we're looking for. |
HI @azych The idea here is to move the pkg code from catalogd to the root (operator-controller) |
Let me look in to this and get back here with my suggestion , you can review and let me know if that sounds good. |
sounds great, just to clarify - I'm not saying we should have a very low-level detailed plan as in "move file X to here, export functions from file Y to here etc.", but more like general and consistent outline of the final structure that's thought-through, readable and predictable for the future. |
It may end up being the same as what we have in the catalog, just in the root directory (all that is the internal of catalogd will be under internal oper-con). However, if we encounter any issues, we'll need to discuss them as they arise. At this point, it seems complicated to come up with more details before we try it out Suppose we encounter duplications or other issues that block the primary goal (moving internal components from A to B). In that case, we'll handle them on a case-by-case basis as part of this initiative. However, the primary goal of this task is to move everything with minimal changes—the focus is on the move itself. Significant refactoring will probably be needed, but that should come later through multiple follow-up PRs. We need to work with baby steps so we can move faster, keep PRs small, speed up reviews, and get changes merged more quickly and make it easier the collab. |
Putting aside the question of how to consolidate catalogd and operator-controller, I've had a few more fundamental feelings recently:
I agree with @azych that it might be helpful to look at everything holistically and decide if we can drive some consistency as part of this exercise: Current listing of our internal trees (just directories):
|
Hi @joelanford, The catalogd/internal/version is no longer required, right? We should now use it from oper-con, as both will have the same version. My idea was to consolidate everything since both can use the same libs—only the controllers are specific to one or the other. For those, I was thinking of either adding a prefix to their names or creating a subdirectory to better organize them. The features also could be internal/features/catalogd.go and nternal/features/operator-controller.go. Then, in follow-ups, we can start cleaning things up. However, are you planning to do something like in follow-ups to break more and start by moving it to internal/catalogd for now? Or would you like to keep it there permanently? |
Thinking about the high-level structure and making some basic working assumptions, like:
Making those assumptions, a few concrete ideas that come to mind:
A variation of this could be to just have
|
After going though the existing code I think below structure would be right for the code (It is similar to @azych's suggestion) . It is logical , intuitively easy to understand and sustainable in long term. Also each step needs to be separate PRs, to reduce the chance to human error during doing the change and also during review.
Each movement of code going break existing tests. I am using a VScode plugin [1] which fixes the import path automatically but still unit tests are failing. I am on the fence about whether all controllers should be together in once directory or they should live separately i.e. catalogd controllers in catalogd directory and operator-controller controllers in operator-controller directory. I do not think either way it is bad. Another area is [1] https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils |
Currently the code of catalogd/internal and operataor-controller/internal exists separately. We need to look in to what we can consolidate in one place i.e. operataor-controller/internal
[1] https://github.com/operator-framework/operator-controller/tree/main/catalogd/internal
[2] https://github.com/operator-framework/operator-controller/tree/main/internal
The text was updated successfully, but these errors were encountered: