Skip to content

Conversation

@MatthiasHuygelen
Copy link

Description

The default set of transient error codes is private. This seems to make it difficult to extend error codes without copy/pasting the base set from this repository. So we expose a copy.

Issues

#2342

@MatthiasHuygelen MatthiasHuygelen requested a review from a team as a code owner January 20, 2026 10:00
Copilot AI review requested due to automatic review settings January 20, 2026 10:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes the previously private default transient error list as a public property to address issue #2342, allowing consumers to extend the error code list without needing to copy/paste the base set from the repository.

Changes:

  • Adds a new public property DefaultTransientErrors to SqlConfigurableRetryFactory that returns a read-only copy of the default transient error list
  • Removes duplicated error list from test helper class RetryLogicTestHelper and migrates to use the new public API
  • Adds XML documentation for the new public property and documents additional error codes (64, 20, 0, -2, 207, 18456, 42108, 42109)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs Adds public DefaultTransientErrors property that returns a ReadOnlyCollection<int> copy of the private transient error list; adds missing error codes to the private list
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/RetryLogic/RetryLogicTestHelper.cs Removes duplicated private error list and updates code to reference the new public SqlConfigurableRetryFactory.DefaultTransientErrors property
doc/snippets/Microsoft.Data.SqlClient/SqlConfigurableRetryFactory.xml Adds XML documentation for the new property and documents the previously undocumented error codes

@MatthiasHuygelen
Copy link
Author

@MatthiasHuygelen please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

@paulmedynski paulmedynski self-assigned this Jan 20, 2026
@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission. The team will need to discuss the public API changes, and I have one implementation suggestion.

@paulmedynski paulmedynski added Public API 🆕 Issues/PRs that introduce new APIs to the driver. Approval Needed Issues/PRs that require approval from the maintainers before changes will be accepted. labels Jan 20, 2026
Copilot AI review requested due to automatic review settings January 20, 2026 12:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

@paulmedynski paulmedynski linked an issue Jan 20, 2026 that may be closed by this pull request
@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copilot AI review requested due to automatic review settings January 22, 2026 06:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

@paulmedynski
Copy link
Contributor

Hi @MatthiasHuygelen - The team will be meeting to discuss on Thursday, and I'll post an update after that.

Copy link
Member

@cheenamalhotra cheenamalhotra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add new error codes as transient without documentation proofs.

Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have discussed these changes, and would like to back out the additions to the error code list. All of the other changes are great!

@cheenamalhotra
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copilot AI review requested due to automatic review settings February 4, 2026 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

@David-Engel
Copy link
Contributor

@paulmedynski
IntrinsicTransientErrors sounds odd to me. To philosophical maybe? How about InitialTransientErrors?

I also considered BaselineTransientErrors, CommonTransientErrors, KnownTransientErrors, and SuggestedTransientErrors.

Open to other suggestions, too.

@MatthiasHuygelen
Copy link
Author

@paulmedynski IntrinsicTransientErrors sounds odd to me. To philosophical maybe? How about InitialTransientErrors?

I also considered BaselineTransientErrors, CommonTransientErrors, KnownTransientErrors, and SuggestedTransientErrors.

Open to other suggestions, too.

@paulmedynski So what should I do?

@paulmedynski
Copy link
Contributor

BaselineTransientErrors sounds good to me!

@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes I requested. A few small tweaks left.

@paulmedynski
Copy link
Contributor

@MatthiasHuygelen - I broke PR pipeline runs for forked repos with #3928, and #3950 should fix it. Once that merges, can you rebase/merge main? Then I will kick off the PR pipeline runs.

@paulmedynski paulmedynski removed the Approval Needed Issues/PRs that require approval from the maintainers before changes will be accepted. label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose default transient SQL error codes for extensibility

6 participants