test(messaging): wait for the applied callback counter in the dev end-to-end check
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
調査の方向性
products/messaging/scripts/test-dev.shを読み、SMSのステータスを待った後にmessaging_provider_callbacks_total{outcome="applied"}メトリクスを確認している箇所を見つけてください。既存の制限付き待機時間内でメトリクスをポーリングし、期待値は1のままにして、タイムアウト時には最後の値を報告してください。Dockerでスクリプトを実行し、その後ShellCheckとshfmt -dで確認してください。チェックがカウンターを待ち、重複したコールバックを引き続き拒否すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What fails
products/messaging/scripts/test-dev.sh can fail in the Messaging PostgreSQL runtime CI job with:
test-dev: GET /v1/messages/<sms>: status delivered
test-dev: GET /v1/messages/<email>: status submitted
test-dev: Mailpit holds 1 message
test-dev: 0 signed callbacks were applied, expected 1
It failed once on pull request #2913, in a run whose changes touch no Messaging code or script. The same job passed on the previous two runs.
Why
The script waits, with a bound, until the SMS reads delivered. It then reads messaging_provider_callbacks_total{outcome="applied"} once.
The runtime records that counter after the callback is handled. In crates/registry-messaging/src/callbacks.rs, the handler awaits receive_callback, which commits the status change, and then calls state.metrics.record_callback(outcome). A status read that lands between the commit and the counter update sees delivered while the counter is still 0. The single metrics read then fails the check.
The runtime behaviour is fine: the counter is eventually correct, and nothing reads it as a commit signal. The check is too strict about ordering.
Proposed change
Read the applied counter inside the same kind of bounded wait the script already uses for the message status. For example, poll $dev_metrics every 0.5 seconds until the applied count is 1 or settle_seconds passes, then fail with the last value read.
Keep the exact expectation of 1, so a duplicate callback still fails the check.
Verification
products/messaging/scripts/test-dev.shpasses locally with Docker.- ShellCheck and
shfmt -dare clean on the script. - Optional: inject a short delay before
record_callbackin a local build and confirm that the check waits rather than fails.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 0
- 平均マージ
- 13時間 7分
- マージ済み PR(30日)
- 119
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
registrystack/registry-stack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
registrystack/registry-stack#2924 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#2890 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
registrystack/registry-stack#2873 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Give the TypeScript live suite a regular execution path対応中かも @jeremi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
registrystack/registry-stack#2849 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
registrystack/registry-stack#2848 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
registrystack/registry-stack の issue をすべて見る
似ている issue
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsotto/sotto-authenticator#139 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
foundry-rs/starknet-foundry#4733 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
autofix:working
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100