[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collected
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- data-engineering
Direzione di ricerca
Inizia con GetTotalPagesFromResponse in backend/plugins/testmo/tasks/shared.go e confronta il modo in cui analizza la paginazione con ProjectPage in backend/plugins/testmo/api/remote_api.go. Aggiungi un test unitario che utilizzi la risposta last_page di primo livello descritta nell’issue, quindi verifica che la funzione restituisca 3 (e gestisca un valore null come 1). Il lavoro è completato quando le esecuzioni, i milestone e le esecuzioni di automazione possono richiedere pagine tramite last_page.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 3.2k
- Fork
- 832
- Merge medio
- 1g 21h
- PR unite (30g)
- 78
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/devlake
-
[Bug][Tempo] Worklog domain ids lack the connection id, so connections with the same worklog id overwrite each otherForse già presa @ShivamSharma43 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Forse già presa @VictorColomb l’ha presa 4 giorni fa. Apertatype/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/devlake#9283 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
I maintainer di solito rispondono entro 2 giorni
-
type/bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 51/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Forse già presa @RyoKusnadi l’ha presa oggi. Apertatype/bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
apache/devlake#9328 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/devlake
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
SAP/crossplane-provider-btp#1175 ·
I maintainer di solito rispondono entro 1 giorno
-
adk: stream concatenation errors bypass retry and failoverForse già presa @OUAO-FRANK l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
google/osv-scalibr#2586 ·
I maintainer di solito rispondono entro 2 giorni
-
Add an MCP server: imageatApertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stacklok/toolhive-catalog#1890 ·
I maintainer di solito rispondono entro 1 giorno
-
heap: pushing an item that is already queued corrupts the indexForse già presa @lbarrosby l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kubernetes-sigs/kwok#1800 ·
I maintainer di solito rispondono entro 1 giorno