-
Notifications
You must be signed in to change notification settings - Fork 322
Expose copy default transient error list #3903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Expose copy default transient error list #3903
Conversation
There was a problem hiding this 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
DefaultTransientErrorstoSqlConfigurableRetryFactorythat returns a read-only copy of the default transient error list - Removes duplicated error list from test helper class
RetryLogicTestHelperand 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 |
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
@dotnet-policy-service agree |
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
paulmedynski
left a comment
There was a problem hiding this 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.
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
doc/snippets/Microsoft.Data.SqlClient/SqlConfigurableRetryFactory.xml
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
doc/snippets/Microsoft.Data.SqlClient/SqlConfigurableRetryFactory.xml
Outdated
Show resolved
Hide resolved
|
Hi @MatthiasHuygelen - The team will be meeting to discuss on Thursday, and I'll post an update after that. |
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
cheenamalhotra
left a comment
There was a problem hiding this 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.
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
paulmedynski
left a comment
There was a problem hiding this 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!
doc/snippets/Microsoft.Data.SqlClient/SqlConfigurableRetryFactory.xml
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this 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.
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/RetryLogic/RetryLogicTestHelper.cs
Outdated
Show resolved
Hide resolved
...osoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs
Outdated
Show resolved
Hide resolved
|
@paulmedynski I also considered Open to other suggestions, too. |
@paulmedynski So what should I do? |
|
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
paulmedynski
left a comment
There was a problem hiding this 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.
|
@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. |
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