Skip to content

[Tech Debt] Replace vendored RetryOperationHelper with inline retry logic — good to have #5983

@gladjohn

Description

@gladjohn

Task type

Tech Debt — Good to have

Context

RetryOperationHelper in Microsoft.Identity.Client/Utils/ is vendored retry logic originally copied from an external repo. It has only 2 consumers. Replacing it reduces the internal API surface and removes code no one actively owns.

Priority

🟢 Low priority / Good to have — Not urgent, not blocking any work. Suitable for spare cycles.

Proposed fix

  1. Identify the 2 call sites
  2. Inline the retry loop directly at each call site (simple for loop with try/catch and Task.Delay)
  3. Preserve exception filtering and callback semantics
  4. Delete RetryOperationHelper.cs
  5. Update/remove RetryOperationHelperTest.cs accordingly

Note: Polly is likely overkill for just 2 call sites. Simple inline retry is preferred.

Risk assessment

🟡 Medium — Retry semantics must be preserved exactly. Verify with existing tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions