[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfter
メンテナーはふだん 2 日以内に返信
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- Go
- スター
- 3.2k
- フォーク
- 840
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 104
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/devlake のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
メンテナーはふだん 2 日以内に返信
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last page対応中かも @ShivamSharma43 が今日担当しました。 オープン
apache/devlake#9365 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
apache/devlake#9358 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopes対応中かも @VictorColomb が 1 日前に担当しました。 オープンtype/bug
apache/devlake#9355 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンtype/bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
apache/devlake#9328 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
GitHub webhook is not subscribed to release events, so `event: release` never triggers対応中かも @qsun が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
woodpecker-ci/woodpecker#7542 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zilliztech/milvus-backup#1386 ·
メンテナーはふだん 1 日以内に返信
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信