[Bug][GitHub] In-progress workflow runs are skipped and not collected after completion
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, github-actions, go
- Lĩnh vực
- data-engineering, devops
Hướng nghiên cứu
Bắt đầu với tác vụ GitHub “Collect Workflow Runs” và workflow collector, tập trung vào cách nó xử lý các kết quả GitHub /actions/runs và các lần đồng bộ gia tăng. Tái hiện chuỗi được báo cáo với một lần chạy in_progress, sau đó là một lần chạy completed, và xác minh rằng workflow đã hoàn tất được giữ lại hoặc được xem xét lại, đồng thời trạng thái cuối cùng của nó khả dụng sau một lần đồng bộ gia tăng sau đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I had searched in the issues and found no similar issues.
What happened
Hi DevLake team,
DevLake is a great platform, and it has already helped us solve several issues with our engineering data and reporting. We really appreciate all the work and effort from the DevLake team and community. Thank you for your continued support and for making such a valuable platform available to the community.
We are using Apache DevLake v1.0.2 with the GitHub plugin to collect GitHub Actions workflow runs.
Environment
- DevLake version: v1.0.2
- Plugin: GitHub
- Deployment: AWS ECS
- Docker image: Official Apache DevLake image
- Sync mode: Incremental sync
- Workflow Run sync frequency: Every 2 hours (
0 */2 * * *)
Our production GitHub Actions workflows can sometimes run for 3–4 hours or longer. Because of this, we configured the GitHub Workflow Runs sync policy to run every 2 hours so that completed workflow runs can be collected regularly.
Problem
During the "Collect Workflow Runs" task, we see log messages such as:
Skipping run{id: 3372***, number: 1158***} with status in_progress
Skipping run{id: 3372***, number: 303***} with status in_progress
The workflow runs are therefore skipped while they are still in_progress.
Later, the GitHub Actions workflow finishes and GitHub changes the workflow run status to completed.
However, during subsequent incremental syncs, the previously skipped workflow run does not appear to be collected or updated after it becomes completed.
This means that a long-running workflow can be missed by the normal incremental sync if it is still in_progress when the collector checks it.
Expected behavior
We would expect DevLake to:
- Detect the workflow run while it is
in_progress. - Retain/track the workflow run as unfinished.
- Re-check the workflow run during subsequent incremental syncs.
- Once GitHub reports the run as
completed, update the existing workflow run record with the final status and information.
Current behavior
Currently, the workflow run is skipped while it is in_progress.
If the workflow finishes after that collection cycle, the subsequent incremental sync does not appear to revisit the previously skipped run.
Investigation so far
We also checked whether this behavior has been addressed in newer DevLake versions.
Based on our investigation, the same completed-only behavior appears to exist in v1.0.3 and v1.0.4-alpha. We also understand that the GitHub workflow collector was rewritten in newer development versions to address GitHub /actions/runs pagination limits, but it still appears to keep only runs with status == "completed".
Therefore, upgrading the official image may improve GitHub collection reliability for large repositories, but it does not appear to address this specific long-running workflow scenario.
We also could not find an existing DevLake issue or PR specifically covering:
"Store in_progress GitHub Actions workflow runs and update them when they become completed."
The related pagination work appears to address a different problem.
Questions
Could you please confirm:
- Is this expected behavior in DevLake v1.0.2?
- Is there any configuration that allows DevLake to re-check previously skipped
in_progressGitHub workflow runs during subsequent incremental syncs? - Is there a recommended
timeAfterconfiguration or backfill/full-sync approach that can be scheduled automatically for this scenario? - If a full/backfill sync is the recommended workaround, how can we configure this in DevLake v1.0.2?
- Is it possible to configure a backfill/time window that only covers the period containing these long-running workflow runs, rather than performing a complete full sync?
- Has this behavior been fixed or changed in a newer DevLake version?
- If a permanent fix is planned, is there a target version in which we could expect this behavior to be addressed?
Production requirement
This is particularly important for our production environment because our workflows can run for 3–4 hours or longer, while our normal GitHub Workflow Runs sync runs every 2 hours.
For example:
10:00 - Workflow starts
10:00 - DevLake sync runs → workflow is in_progress → DevLake skips it
12:00 - DevLake sync runs again
14:00 - Workflow finally completes
14:00+ - Subsequent incremental sync does not appear to revisit the previously skipped run
### What do you expect to happen
We expect DevLake to retain/track GitHub Actions workflow runs while they are `in_progress` and re-check them during subsequent incremental syncs.
Once the workflow run changes to `completed` in GitHub, DevLake should update the existing workflow run record with its final status and information.
This would ensure that long-running GitHub Actions workflows are not missed by incremental syncs when they are still `in_progress` during the initial collection.
### How to reproduce
1. Configure a GitHub connection in DevLake v1.0.2.
2. Configure the GitHub Workflow Runs sync policy with an incremental sync frequency of every 2 hours (`0 */2 * * *`).
3. Start a GitHub Actions workflow that takes several hours to complete.
4. Run the DevLake "Collect Workflow Runs" task while the GitHub workflow is still `in_progress`.
5. Observe that DevLake logs:
`Skipping run{id: ..., number: ...} with status in_progress`
6. Allow the GitHub Actions workflow to finish and become `completed`.
7. Run the next incremental sync.
8. Observe that the previously skipped workflow run does not appear to be collected or updated in DevLake.
Expected result:
The workflow run should be retained/re-checked and updated once its GitHub status changes from `in_progress` to `completed`.
Actual result:
The workflow run is skipped while `in_progress` and does not appear to be revisited by subsequent incremental syncs after completion.
### Anything else
Skipping run{id: 3372***, number: 1158***} with status in_progress
### Version
v1.0.2
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
- Ngôn ngữ chính
- Go
- Star
- 3.1k
- Fork
- 812
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 51
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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
-
type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
type/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
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 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
acceptance-tests phase-coding schema-coverage testing triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100