Refactor `listTemplates` and `listIsos` workflows
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 6 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 32
Mô tả
The workflows of the `listIsos` and `listTemplates` APIs, particularly the `com.cloud.api.query.QueryManagerImpl#searchForTemplatesInternal` method, could greatly benefit from refactoring.
This method accepts over 20 parameters, spans approximately 200 lines, performs DAO operations directly from the business/service layer, and lacks modularization, logging, and unit tests. These issues make troubleshooting and maintenance challenging.
https://github.com/apache/cloudstack/blob/f52e05863e608f53f9e97e93fe47577b8dfe189b/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L4802-L5007
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu tại server/src/main/java/com/cloud/api/query/QueryManagerImpl.java ở searchForTemplatesInternal, sau đó lần theo các workflow listIsos và listTemplates cùng các thao tác DAO trực tiếp của chúng. Việc tái cấu trúc hoàn tất khi các workflow được mô-đun hóa, trách nhiệm của service layer được cải thiện, logging được bổ sung và các unit test bao phủ hành vi đã thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend-api-design, cloud
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100