[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfter
Los mantenedores suelen responder en 2 días
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The CircleCI collectPipelines subtask fails with runtime error: invalid memory address or nil pointer dereference when the sync policy has no timeAfter.
CollectPipelines (plugins/circleci/tasks/pipeline_collector.go) reads the time range and dereferences it for every pipeline in the response:
timeAfter := rawDataSubTaskArgs.Ctx.TaskContext().SyncPolicy().TimeAfter
...
if pipelineCreatedAt.Before(*timeAfter) {
return filteredItems, api.ErrFinishCollect
}
SyncPolicy.TimeAfter is optional. It is nil for advanced mode blueprints (config-ui creates them with timeAfter: undefined), when the start date is cleared in the blueprint's sync policy, and for directrun without a timeAfter. As soon as the first page has a pipeline, the response parser panics, the worker scheduler records the panic as the task error, and no CircleCI data is collected.
What do you expect to happen
With no timeAfter, every pipeline is collected, like the other collectors do (the collector framework already treats a missing timeAfter as "no lower bound").
How to reproduce
- Create an advanced mode blueprint with a CircleCI project, or clear the start date of a normal blueprint's time range.
- Run it.
collectPipelinesfails with the nil pointer dereference.
Anything else
Proposed fix (I have a PR ready): only filter by timeAfter when it is set, and check that SyncPolicy() isn't nil before reading it.
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
- Lenguaje dominante
- Go
- Estrellas
- 3.2k
- Forks
- 840
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 104
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/devlake
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
Los mantenedores suelen responder en 2 días
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last pagePosiblemente ocupada @ShivamSharma43 la tomó hoy. Abierto
apache/devlake#9365 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loadedPosiblemente ocupada @ShivamSharma43 la tomó hace 1 día. Abierto
apache/devlake#9358 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesPosiblemente ocupada @VictorColomb la tomó hace 1 día. Abiertotype/bug
apache/devlake#9355 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertotype/bug
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
apache/devlake#9328 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de apache/devlake
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersPosiblemente ocupada @qsun la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
woodpecker-ci/woodpecker#7542 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
zilliztech/milvus-backup#1386 ·
Los mantenedores suelen responder en 1 día
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día