Details
-
Enabler
-
Not Assigned
-
None
-
Obs Mgt & Controls
-
-
-
5
-
5
-
0
-
Team_NCRA
-
Sprint 2
-
-
-
-
9.6
-
Stories Completed, Integrated, Solution Intent Updated, BDD Testing Passes (no errors), Outcomes Reviewed, NFRS met, Demonstrated, Satisfies Acceptance Criteria, Accepted by FO
-
-
Cross_Team_Code_Review Team_KAROO Team_NCRA
-
SPO-863
Description
During the IP sprint of PI 7, NCRA and KAROO team jointly worked on POC for refactoring the TMC repository. Although the scope of the POC was limited to refactor the code of SubarrayNode and DishLeafNode, the work was carried out with the idea of identifying common code that can be separated out for reuse. The project provided encouraging results on refactoring the existing code base: Link to the POC branch: https://gitlab.com/ska-telescope/tmc-prototype/-/tree/IP/refactor_subarray_node
The feature will extend the work done during the IP project to refactor rest of the TMC nodes and achieve better separation between application/control logic and Tango implementation. This will pave the way towards achieving code commonality between the TMC Mid and TMC Low, and move the common code to a separate repository.
The second part of the work is rescoped into a spike to work out the separation of TMC products into separate repositories. The spike will enable separation of TMC Central Node and Subarray Nodes into separate repositories, enabling the deployment and release of these nodes independently. These images will be published on Nexus.
=========================================================
Original Feature Description Maintained for Reference:
The TMC repository consists of multiple TMC components (Central Node, Subarray Node, Leaf Nodes, etc). These are in fact separate products as per the CDR documentation.
Each product is implemented as a separate Python package, however, in the TMC prototype, all the packages are installed in a single docker image and the image is used in SKAMPI.
Until PI#7, the TMC repository had only SKA Mid specific components. When SKA Low was introduced in PI8, the components specific to SKA Low were added to the same repository and to the image.
The current repository structure does not support an independent release cycle of individual products. It is also hard to maintain the lifecycle of a group of products specific to the Mid or Low telescope as there is a single docker image that is published.
When a new feature is implemented, a new version of the docker image is published for integration into the MVP. At this time, the version number of all the products is incremented even for products that are not modified in that feature.
There is also an issue from the sprint management standpoint. For a feature that requires changes in multiple products, it becomes hard to slice into separate user stories as multiple merge requests lead to merge conflicts as too many branches are created and many merge requests are raised during the same time frame. If a single branch is maintained to avoid the conflicts, the Merge Request(MR) becomes too big and it takes a lot of time to review it. It is also a recommended practice to maintain smaller MRs.
Testing also becomes harder as a small change on one node requires the execution of the entire test suite in the pipeline which takes much more time than running the test suite of a single product.
Due to the structure of the individual Python package in the repository, it is not possible to extract and maintain a single copy of the common code.
Moving forward into construction, it will be necessary to multiple smaller repositories so that the individual product lifecycle can be managed with maximum possible code reuse.
The proposal is to refactor the tmc-prototype repository into smaller ones to fulfill the above purpose.
During the IP sprint of PI 7, NCRA and KAROO team jointly worked on POC for refactoring the TMC repository. Although the scope of the POC was limited to refactor the code of SubarrayNode and DishLeafNode, the work was carried out with the thought of identifying common code that can be separated out for reuse. The project provided encouraging results on refactoring the existing code base that can be organized into multiple smaller repositories with common code maintained separately. Link to the POC branch: https://gitlab.com/ska-telescope/tmc-prototype/-/tree/IP/refactor_subarray_node
Also see similar feature SP-1442