[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last page
Les mainteneurs répondent en général sous 2 jours
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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
- Langage dominant
- Go
- Étoiles
- 3.2k
- Forks
- 840
- Merge moyen
- 1 j 21 h
- PR mergées (30 j)
- 104
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/devlake
-
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
Les mainteneurs répondent en général sous 2 jours
-
[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfterPeut-être pris @ShivamSharma43 l’a pris aujourd’hui. Ouverte
apache/devlake#9367 · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loadedPeut-être pris @ShivamSharma43 l’a pris il y a 1 jour. Ouverte
apache/devlake#9358 · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesPeut-être pris @VictorColomb l’a pris il y a 1 jour. Ouvertetype/bug
apache/devlake#9355 · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouvertetype/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
apache/devlake#9328 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de apache/devlake
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersPeut-être pris @qsun l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
woodpecker-ci/woodpecker#7542 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
zilliztech/milvus-backup#1386 ·
Les mainteneurs répondent en général sous 1 jour
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour