apache / apache/cloudstack

Refactor `listTemplates` and `listIsos` workflows

未關閉
#11,209 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
type:cleanup type:enhancement
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 19 小時
30 天內合併 PR
32

描述

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

貢獻指南

開啟貢獻指南

研究方向

從 server/src/main/java/com/cloud/api/query/QueryManagerImpl.java 中的 searchForTemplatesInternal 開始,接著追蹤 listIsos 和 listTemplates 工作流程及其直接的 DAO 操作。當工作流程完成模組化、服務層職責獲得改善、加入日誌記錄,且單元測試涵蓋變更後的行為時,重構即完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
backend-api-design, cloud
Issue 類型
重構
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。