Skip to content
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

[ServiceBus] Improve AMQP Error handling #16427

Merged

Conversation

yunhaoling
Copy link
Contributor

addressing issue:
#15688
#15749

  • Operations failing due to uamqp.errors.LinkForceDetach caused by no activity on the connection for 10 minutes will now be retried internally.
  • uamqp.errors.AMQPConnectionError errors with condition code amqp:unknown-error are now categorized into ServiceBusConnectionError instead of the general ServiceBusError.

@yunhaoling
Copy link
Contributor Author

/azp run python - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@check-enforcer
Copy link

check-enforcer bot commented Feb 2, 2021

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

Copy link
Member

@swathipil swathipil left a comment

Choose a reason for hiding this comment

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

lgtm (although I'm no expert)

@@ -491,6 +493,7 @@ class AutoLockRenewTimeout(ServiceBusError):
AMQPErrorCodes.UnauthorizedAccess: ServiceBusAuthorizationError,
AMQPErrorCodes.NotImplemented: ServiceBusError,
AMQPErrorCodes.NotAllowed: ServiceBusError,
AMQPErrorCodes.LinkDetachForced: ServiceBusConnectionError,
Copy link
Member

Choose a reason for hiding this comment

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

What kind of error was this raised as before?

Copy link
Contributor Author

@yunhaoling yunhaoling Feb 10, 2021

Choose a reason for hiding this comment

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

it used to be the general ServiceBusError which would not be retried.

but after contemplating over it, I think this should be categorized into ServiceBusConnectionError and be retried internally which saves users' efforts -- users could do nothing special but retry by themselves, so we could try for them. This also aligns the behavior with the JS SDK.

however, the retry would just happen in no-session case. In session case, we don't retry on link/connection failure by design.

@yunhaoling yunhaoling requested a review from annatisch February 11, 2021 18:18
@yunhaoling yunhaoling merged commit 591ccd5 into Azure:master Mar 1, 2021
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Mar 1, 2021
…into correct_healthcare

* 'master' of https://github.com/Azure/azure-sdk-for-python: (30 commits)
  [EventGrid] Improve docs (Azure#16986)
  Fixed delete_blob method signature (Azure#16983)
  Fixed Content-MD5 serialization and typing (Azure#16987)
  [eventgrid] Black formatting and tests suite (Azure#16989)
  Appconfig perf test (Azure#16809)
  adds support for milliseconds on datetime objects (Azure#16847)
  [ServiceBus] Improve AMQP Error handling (Azure#16427)
  T2 resource 2021 02 26 (Azure#16961)
  T2 servicefabricmanagedclusters 2021 02 26 (Azure#16958)
  Update Prepare-Release script (Azure#16976)
  the previous filter was erroneously filtering out real files. (Azure#16978)
  Update azure-core minimum version (Azure#16968)
  update documention in depends section of eng_sys_checks.md (Azure#16967)
  version (Azure#16959)
  T2 web 2021 02 24 (Azure#16901)
  Change test pipeline to run in eastus2 (Azure#16950)
  Adding azure-devtools to mr-auth dev_requirements (Azure#16953)
  Add perf tests for eventgrid (Azure#16949)
  temp fix for canary tests (Azure#16945)
  Update get_package_properties to also return path to setup.py (Azure#16946)
  ...
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this pull request Jan 6, 2022
Web ant95 2021 03 01 (Azure#16506)

* Adds base for updating Microsoft.Web from version stable/2021-02-01 to version 2021-03-01

* Updates readme

* Updates API version in new specs and examples

* Re-add Microsoft.CertificateRegistration and Microsoft.DomainRegistration APIs since they do not get pulled in by OpenApiHub (Azure#15917)

* Introduce enterpriseGradeCdnStatus to StaticSites.json (Azure#16080)

* Update StaticSites.json

* Update StaticSites.json

* Onedeploy API swapper spec (Azure#15985)

* Onedeploy API swapper spec

* Adding onedeploy custom keyword

* Formatting onedeploy api indentation

Formatting onedeploy api indentation

* prettifier

Co-authored-by: Calvin Chan <calvinch4n@gmail.com>

* Fix status codes for syncfunctiontriggers (Azure#16413)

* Add GET endpoint at /config/authsettingsv2 for Microsoft.Web (Azure#16427)

* Add GET endpoint at /config/authsettingsv2 for Microsoft.Web

* Fix duplicate operation ids

* Swagger for ASD Transfer out (Azure#16000)

* Add domain transfer out to swagger

* Prettifier

* Add 202 response for webapp restart

* Add certificate listHostnameBindingsOfCertificate

* Formatting

* Swagger for listHostnameBindings endpoint (Azure#16516)

* Swagger for listHostnameBindings endpoint

* Re-add Microsoft.CertificateRegistration and Microsoft.DomainRegistration APIs since they do not get pulled in by OpenApiHub (Azure#15917)

* ops

Co-authored-by: Naveed Aziz <naveeda@microsoft.com>

* User/jennylaw/containerapp (Azure#16657)

* Pre-Prettier-commit

* Adding missing file

* Prettier fixes

* Add missing definitions

* Fix intendation in readme.md

* add suppressions

* Add custom hostname sites endpoint (Azure#16745)

* Add custom hostname sites endpoint

* Fix models

* Swagger Fixes for Container App, KubeEnvironments spec (Azure#16793)

* Pre-Prettier-commit

* Adding missing file

* Prettier fixes

* Add missing definitions

* Fix intendation in readme.md

* add suppressions

* Fix Kube Environments 2021-03-01 contract + add list secrets api to Container Apps Swagger

* Fix sercret read property

* Prettier fix

* Model fix

* Prettier Fix #2

Co-authored-by: Jenny Lawrance <jennylaw@microsoft.com>

* Add long running extension for restart (Azure#16791)

* Remove unused API from ANT95 swagger (Azure#16901)

* Address PR comments (Azure#17019)

* Fixing PR comments (Azure#17127)

* Remove Certificate Hostname bindings API (Azure#17204)

* Remove Certificate Hostname bindings API

* Remove examples file as well

Co-authored-by: mkarmark <mikarmar@microsoft.com>
Co-authored-by: SatishRanjan <SatishRanjan@users.noreply.github.com>
Co-authored-by: Calvin Chan <calvinch4n@gmail.com>
Co-authored-by: Connor McMahon <comcmaho@microsoft.com>
Co-authored-by: JennyLawrance <jennylaw@microsoft.com>
Co-authored-by: Sanchit Mehta <sanchit.mehta602@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants