[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last page
I maintainer di solito rispondono entro 2 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The Asana collectors don't page through list endpoints correctly.
-
collectStory,collectSubtaskandcollectTag(plugins/asana/tasks/{story,subtask,tag}_collector.go) sendlimit=100but have noPageSizeand noGetNextPageCustomData, so theApiCollectormakes one request per task and never sendsoffset. Only the first 100 stories, subtasks and tags of each task are collected. Stories include system events (assignments, section moves, due date changes), so busy tasks go past 100. -
collectTaskandcollectUserdo page withoffset, but theirGetNextPageCustomDatareturnsnil, nilwhennext_pageis null:
if resp.NextPage != nil && resp.NextPage.Offset != "" {
return resp.NextPage.Offset, nil
}
return nil, nil
nil, nil doesn't end the collection. The collector sets CustomData to nil and requests the next page, and the query then has no offset, so it asks for page 1 again. When the last page is full (100 items) and Asana returns "next_page": null, the collector keeps re-collecting the project from the start and saving the same raw rows again.
From the Asana docs (https://developers.asana.com/docs/pagination): limit must be between 1 and 100, and "If there are no more pages available, next_page will be null and no offset will be provided."
What do you expect to happen
All five collectors follow next_page.offset and stop when next_page is null.
How to reproduce
- Stories: collect a project with a task that has more than 100 stories.
_raw_asana_storieshas 100 rows for that task. - Tasks: the
GetNextPageCustomDataabove returnsnil, nilfor a full page with"next_page": null, andfetchPagesSequentiallyinhelpers/pluginhelper/api/api_collector.goonly stops on a short page orErrFinishCollect.
Anything else
Proposed fix (I have a PR ready): a shared getNextAsanaPageOffset that returns api.ErrFinishCollect when next_page is null, and a setAsanaPageQuery that sets limit and offset, used by the task, user, story, subtask and tag collectors.
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
- 840
- Merge medio
- 1g 21h
- PR unite (30g)
- 104
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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfterForse già presa @ShivamSharma43 l’ha presa oggi. Aperta
apache/devlake#9367 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loadedForse già presa @ShivamSharma43 l’ha presa 1 giorno fa. Aperta
apache/devlake#9358 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesForse già presa @VictorColomb l’ha presa 1 giorno fa. Apertatype/bug
apache/devlake#9355 · 1 assegnatario ·
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 di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. 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 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersForse già presa @qsun l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
woodpecker-ci/woodpecker#7542 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
zilliztech/milvus-backup#1386 ·
I maintainer di solito rispondono entro 1 giorno
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno