Refactor `listTemplates` and `listIsos` workflows
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 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 操作を追跡します。ワークフローがモジュール化され、service layer の責務が改善され、ログが追加され、変更された動作をカバーする unit test が作成された時点で、リファクタリングは完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend-api-design, cloud
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100