Set-MgRequestContext: expose RetryUnprocessedMutationsOnly so POST and PATCH aren't resent after a 504
メンテナーはふだん 7 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp, powershell
調査の方向性
Start by tracing IRequestContext, RequestContext, Set-MgRequestContext, and the RetryHandlerOption construction in GraphHttpClientFactory; check the related Get-MgRequestContext documentation and existing tests. Confirm the target SDK versions and that the resolved Kiota HTTP client library supports the option. Done when the setting can be configured through the request context, defaults to false, and the cmdlet and documentation reflect it.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe the problem.
The Graph PowerShell SDK retries a POST after a 504 Gateway Timeout, which can repeat its side effect. With sendMail, one Invoke-MgGraphRequest call can deliver the same email up to four times while the caller sees one error. The reproduction and investigation are in microsoft/kiota-dotnet#851.
Kiota has since added an opt-in setting for this, RetryHandlerOption.RetryUnprocessedMutationsOnly (microsoft/kiota-dotnet#864, merged and expected in kiota-dotnet 2.2.0). When it's on, POST and PATCH are retried only after a 429 or 503, and other responses, including a 504, go back to the caller. It defaults to off.
PowerShell users can't turn it on yet, because Set-MgRequestContext only exposes MaxRetry, RetryDelay, RetriesTimeLimit and ClientTimeout. The only workaround today is Set-MgRequestContext -MaxRetry 0 around each send. That setting is process-wide, so while a send is in flight it also turns off retries for every other Graph request in the process, and two overlapping sends in different runspaces can undo each other's setting.
Describe the solution you'd like.
Expose the setting through the request context:
- add
bool RetryUnprocessedMutationsOnlytoIRequestContext, defaulting tofalseinRequestContext - add a
-RetryUnprocessedMutationsOnlyswitch toSet-MgRequestContext, following the existingBoundParameterspattern - pass it into the
RetryHandlerOptionthatGraphHttpClientFactoryalready builds from the request context - update the
Set-MgRequestContextandGet-MgRequestContextdocs
Set-MgRequestContext -RetryUnprocessedMutationsOnly
Additional context?
This needs Microsoft.Kiota.Http.HttpClientLibrary 2.2.0 or later, which the Authentication module currently gets through Microsoft.Graph.Core.
Open questions:
- Should this target V2, V3 (#3874), or both?
- Is a direct reference to Kiota 2.2.0 acceptable, or should this wait for a
Microsoft.Graph.Corerelease that requires it?
I'm happy to open the PR once 2.2.0 ships.
- 主要言語
- C#
- スター
- 911
- フォーク
- 236
- 平均マージ
- 9日 18時間
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-powershell のほかの issue
-
DirectoryObjects: drop the publicKeyInfrastructureRoot tag from the module mapping (v2)対応中かも @gavinbarron が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoftgraph/msgraph-sdk-powershell#3752 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 7 日以内に返信
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
microsoftgraph/msgraph-sdk-powershell#3918 ·
メンテナーはふだん 7 日以内に返信
-
Status: Needs Investigation type:investigation
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
microsoftgraph/msgraph-sdk-powershell#3913 ·
メンテナーはふだん 7 日以内に返信
-
[v3 wrappers] Support arbitrary optional query parameters対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンstatus:waiting-for-triage type:feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoftgraph/msgraph-sdk-powershell#3897 ·
メンテナーはふだん 7 日以内に返信
-
Tracking for V3 Upgrade対応中かも @ramsessanchez が 22 日前に担当しました。 オープンtype:epic
microsoftgraph/msgraph-sdk-powershell#3874 · 担当者 1 名 ·
メンテナーはふだん 7 日以内に返信
microsoftgraph/msgraph-sdk-powershell の issue をすべて見る
似ている issue
-
🐛 bug 🕒 low effort good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
guibranco/Sankhya-SDK-dotnet#654 ·
メンテナーはふだん 1 日以内に返信
-
a-corriger bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
christian-raj/S-Aloha#340 ·
-
遇到超大文件会卡住オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/microsoft-ui-reactor#1626 ·
メンテナーはふだん 1 日以内に返信
-
Triage:Untriaged Type:Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100