Listener not aware of pending work after restart/reinstall

オープン
#4,027 コメント 9 件 リアクション 7 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, go, helm, kubernetes

調査の方向性

issue にある再起動、再インストール、listener 更新のシナリオを再現し、まず listener の起動ログと、lastMessageID 0 を使用する「Getting next message」ステップから始めてください。起動後に保留中の処理がどのように検出されるかを追跡してください。listener がオフラインの間にキューに入れられた workflow が、キャンセルも再実行もされずに取り込まれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug gha-runner-scale-set
Checks
Controller Version

0.9.3

Deployment Method

Helm

Checks
  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. I have ARC setup working fine
2. I am unistalling runnerset X
3. Triggering workflow that awaits for runner X
4. I'm installing runnerset X again (no changes in runnerset configuration)
5. The workflow awaits forever
6. After clicking Cancel/Rerun on the workflow, listener sees new work to be done and all works fine again

It also happens in such scenario:

1. I have ARC setup working fine
2. I am updating runnerset X - new listener is being created
3. Triggering workflow that awaits for runner X
4. The new (updated) listener is up
5. The workflow awaits forever
6. After clicking Cancel/Rerun on the workflow, listener sees new work to be done and all works fine again
Describe the bug

The listener is not aware of the work and runners needed, if the work was scheduled when listener was offline.
After cancel/rerun on the job all works fine.

Describe the expected behavior

The work should be picked up by the listener once it is online, no matter if it was scheduled when listener was up or not.

Additional Context
Listener logs:

{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"app initialized"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"Starting listener"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"refreshing token","githubConfigUrl":"https://github.com/REDACTED"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"getting access token for GitHub App auth","accessTokenURL":"https://api.github.com/app/installations/REDACTED"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"getting runner registration token","registrationTokenURL":"https://api.github.com/orgs/REDACTED/actions/runners/registration-token"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app","message":"getting Actions tenant URL and JWT","registrationURL":"https://api.github.com/actions/runner-registration"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.listener","message":"Current runner scale set statistics.","statistics":"{\"totalAvailableJobs\":0,\"totalAcquiredJobs\":0,\"totalAssignedJobs\":0,\"totalRunningJobs\":0,\"totalRegisteredRunners\":0,\"totalBusyRunners\":0,\"totalIdleRunners\":0}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Calculated target runner count","assigned job":0,"decision":0,"min":0,"max":3,"currentRunnerCount":0,"jobsCompleted":0}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Compare","original":"{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":-1,\"patchID\":-1,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}","patch":"{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"patchID\":0,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Preparing EphemeralRunnerSet update","json":"{\"spec\":{\"patchID\":0,\"replicas\":null}}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Ephemeral runner set scaled.","namespace":"REDACTED","name":"REDACTED","replicas":0}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.listener","message":"Getting next message","lastMessageID":0}

I use fork, no changes in the listener code.
Newest runner image in use.

Controller Logs
Controller logs look normally. Only listener is not picking up work
Runner Pod Logs
N/A
主要言語
Go
スター
6.7k
フォーク
1.5k
平均マージ
1時間 34分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

actions/actions-runner-controller のほかの issue

actions/actions-runner-controller の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。