[Bug][CircleCI] collectPipelines panics with a nil pointer dereference when the sync policy has no timeAfter
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 3.2k
- Fork
- 840
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 104
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/devlake
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][Asana] Story, subtask and tag collectors stop at 100 per task; task and user collectors restart on a full last pageCó thể đã có người làm @ShivamSharma43 đã nhận hôm nay. Đang mở
apache/devlake#9365 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loadedCó thể đã có người làm @ShivamSharma43 đã nhận 1 ngày trước. Đang mở
apache/devlake#9358 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][Linear] Config UI cannot associate a scope config with Linear team scopesCó thể đã có người làm @VictorColomb đã nhận 1 ngày trước. Đang mởtype/bug
apache/devlake#9355 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởtype/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
apache/devlake#9328 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/devlake
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersCó thể đã có người làm @qsun đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woodpecker-ci/woodpecker#7542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zilliztech/milvus-backup#1386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày