[Bug][GitHub] In-progress workflow runs are skipped and not collected after completion
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github, github-actions, go
調査の方向性
GitHub の「Collect Workflow Runs」タスクと workflow collector から始め、GitHub /actions/runs の結果と増分同期の処理に焦点を当てます。in_progress の実行、続いて completed の実行という報告された一連の流れを再現し、後続の増分同期の後に completed した workflow が保持または再確認され、その最終ステータスを利用できることを検証します。
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Go
- スター
- 3.1k
- フォーク
- 812
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 51
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/devlake のほかの issue
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
type/bug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
JakeChampion/lang#10213 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oasisprotocol/oasis-sdk#2523 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100