Flaky on windows-latest: OAuth metadata fetch times out in in-memory tests (same class as #1701, not covered by #1702)

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp

調査の方向性

GetAuthServerMetadataAsync を読み、#1702 で追加された server/discover プローブのタイムアウト処理と比較してください。3 つの名前付きテストから開始して、windows-latest の Build and Test レッグを再実行し、失敗を再現してください。メタデータ取得のタイムアウトがアサーション失敗ではなくタイムアウトエラーとして表面化し、影響を受けるテストが決定的になれば完了です。

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

説明

area-tests bug help wanted P3 ready for work

Describe the bug

Several OAuth tests occasionally fail on the windows-latest legs of Build and Test.
If that occurs, the GetAuthServerMetadataAsync method gets a TaskCancelledException
during a slow TLS handshake using the in-memory duplex pipe, ClientOAuthProvider wraps
that into the "Failed to find .well-known/..." message, and assertion expectations
about that message fail on the injected text – that is, the error manifests itself as
a confusing assertion failure instead of a timeout.

It appears to be similar to #1701 from the OAuth side of things. #1702 increased
the server/discover probe timeout in the in-memory tests, but the OAuth metadata
path has a similar timeout which was not added and is still failing after that merge.

Tests affected so far:

  • OAuth.AuthTests.CannotAuthenticate_WithInvalidClientMetadataDocument
  • OAuth.DcrFailureTests.DcrRejection_PropagatesToConsumer_WithStatusBodyAndSentParameters
  • ClientConformanceTests.RunConformanceTest(scenario: "auth/offline-access-scope")

To Reproduce
Intermittent, not deterministic reproduction possible. It is reproduced by running Build and Tests
of windows-latest leg multiple times.

The following two incidents are on August 9, right after merging PR #1702, for two consecutive
commits of the same branch which are identical but different in comments and tests:

  1. a9f02522 - windows-latest, Debug - job - auth/offline-access-scope
  2. e07f4999 - windows-latest, Release - [job](https://

Expected behavior
Tests need to be deterministic. In case the timeout happens during fetching of the metadata, the issue should be thrown as a timeout and not as an assertion failure on an error message that’s not related to it at all.

Logs
From the e07f4999 Release run

主要言語
C#
スター
4.5k
フォーク
814
平均マージ
9日 19時間
マージ済み PR(30日)
4

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

modelcontextprotocol/csharp-sdk のほかの issue

modelcontextprotocol/csharp-sdk の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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