[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collected
維護者通常 2 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
從 backend/plugins/testmo/tasks/shared.go 中的 GetTotalPagesFromResponse 開始,並將其分頁解析方式與 backend/plugins/testmo/api/remote_api.go 中的 ProjectPage 進行比較。新增一個單元測試,使用 issue 中描述的頂層 last_page 回應,接著驗證函式回傳 3(並將 null 值處理為 1)。當 runs、milestones 和 automation runs 能透過 last_page 請求頁面時,工作即告完成。
由索引模型根據 Issue 內容生成。
描述
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The Testmo collectRuns, collectMilestones and collectAutomationRuns subtasks only collect the first page (100 items) of a project.
They all use GetTotalPagesFromResponse in backend/plugins/testmo/tasks/shared.go, which reads the page count from meta.total_pages:
body := &models.TestmoResponse{} // data, links, meta, errors
...
if meta, ok := body.Meta.(map[string]interface{}); ok {
if totalPages, exists := meta["total_pages"]; exists { ... }
}
return 1, nil
Testmo list responses have no meta object. The pagination fields are at the top level of the body: the Testmo REST API spec (RunPage, MilestonePage, AutomationRunPage) lists page, prev_page, next_page, last_page, per_page, total and result. The plugin's own remote scope API already reads this format (ProjectPage in backend/plugins/testmo/api/remote_api.go follows next_page). So meta is always nil, the function always returns 1, and the ApiCollector never requests page 2.
What do you expect to happen
All runs, milestones and automation runs of the project are collected, i.e. the collectors fetch pages 2..last_page.
How to reproduce
- Add a Testmo project with more than 100 runs (or milestones / automation runs) as a data scope.
- Run the blueprint.
_raw_testmo_runs(and_tool_testmo_runs) hold only 100 rows for the project, while the project'srun_countis higher.
A unit test that passes {"page": 1, "next_page": 2, "last_page": 3, "per_page": 100, "total": 250, "result": [...]} to GetTotalPagesFromResponse gets 1 instead of 3.
Anything else
Proposed fix (I have a PR ready): read the top-level last_page in GetTotalPagesFromResponse (1 when it is null), plus a unit test.
Version
main
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要語言
- Go
- 星號
- 3.2k
- 分支
- 840
- 平均合併
- 2 天 6 小時
- 30 天內合併 PR
- 94
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/devlake 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 60/100
維護者通常 2 天內回覆
-
type/bug
難度 4/5 3-5 天 新手友好度 51/100
維護者通常 2 天內回覆
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500可能重新可做 關聯的 PR 已關閉且未合併。 未關閉type/bug
難度 3/5 1-2 天 新手友好度 58/100
維護者通常 2 天內回覆
-
type/question
難度 1/5 1 小時以內 新手友好度 10/100
apache/devlake#9325 · 1 則留言 · 1 個 reaction ·
維護者通常 2 天內回覆
-
[Refactor][Build] Build the core and all plugins into a single binary by default可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉component/plugins type/refactor
難度 5/5 一週以上 新手友好度 25/100
維護者通常 2 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 78/100
koordinator-sh/koordinator#3257 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
-
Component: Backup and Restore Type: Bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
needs-acceptance wg/router-models-inference-runtime
難度 2/5 1-3 小時 新手友好度 88/100
vllm-project/semantic-router#6018 ·
維護者通常 2 天內回覆