Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] Configuration subscription stops permanently after the daprd sidecar restarts

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
grpc, python
領域
api, backend

調査の方向性

Start in dapr/clients/grpc/_response.py with ConfigurationWatcher, then trace subscribe_configuration() in both dapr.clients.DaprClient and dapr.aio.clients.DaprClient. Reproduce the stream failure by restarting daprd, and verify that both subscription paths recover and deliver later updates without restarting the application.

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

説明

kind/bug

Expected Behavior

DaprClient.subscribe_configuration() keeps delivering configuration updates for the lifetime of the client.
If the daprd sidecar process exits and comes back (for example an OOM kill of the sidecar container while the application container keeps running), the SDK should re-establish SubscribeConfigurationAlpha1 against the new sidecar and continue calling the handler. Updates that happened while the sidecar was down should be visible on the new subscription, or the application should at least be able to observe that the previous stream ended.
Unary calls such as get_configuration() already work again once the new sidecar is listening. The long-lived configuration subscription should recover the same way.

Actual Behavior

The subscription works after a fresh application start. After daprd restarts, the handler is never called again. The application process stays healthy, so a Kubernetes pod is not recreated, and dynamic config updates are silently lost until the application process itself restarts.
ConfigurationWatcher in dapr/clients/grpc/_response.py reads SubscribeConfigurationAlpha1 on a daemon thread. When the stream raises, the thread prints to stdout and returns:

except Exception:
    print(f'{self.store_name} configuration watcher for keys {self.keys} stopped.')
    pass

There is no retry. subscribe_configuration() does not retain the ConfigurationWatcher, so nothing is left to start a new stream. The failure is not reported through the Python logger, and the returned subscription id belongs to the dead sidecar.
Seen with dapr Python SDK 1.18.3. Both dapr.clients.DaprClient.subscribe_configuration and dapr.aio.clients.DaprClient.subscribe_configuration use this watcher.

Steps to Reproduce the Problem

  1. Run an app with a configuration.redis component and the Python SDK 1.18.3.
  2. Subscribe once at startup:
from dapr.clients import DaprClient
def handler(subscription_id, response):
    print("update", subscription_id, {k: v.value for k, v in response.items.items()})
with DaprClient() as client:
    subscription_id = client.subscribe_configuration(
        store_name="configstore",
        keys=["my-key"],
        handler=handler,
    )
    print("subscribed", subscription_id)
    # keep the process alive
  1. Confirm a config change invokes handler.
  2. Restart only daprd. In Kubernetes this is a sidecar OOM (OOMKilled) while the app container keeps the same process. Locally, stop and start the daprd process without restarting the app.
  3. Change my-key again after daprd is healthy.
    handler is not called. Stdout may contain {store} configuration watcher for keys [...] stopped. Recreating the app process makes updates work again until the next sidecar restart.

Release Note

RELEASE NOTE: FIX Reconnect configuration subscriptions after the Dapr sidecar stream drops.

主要言語
Python
スター
272
フォーク
152
平均マージ
2日 22時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

dapr/python-sdk のほかの issue

dapr/python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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