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

Fixed bug in sip routing. SDK shouldnt send empty patch. #27919

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

jiriburant
Copy link
Member

Description

Recently, we found bug in sending PATCH for sip configuration. When the trunks dictionary on the backend is already empty and user tries to call set_trunks with empty list, the API returns 422, unproccessable entity, because the PATCH request has empty body. This happens, because for trunks dictionary, we're using merge patch.

To fix this, check was added, to send the PATCH only if there are any trunks, that changed.

Scenarios for set_routes don't have this problem, as routes list is always completely replaced and not merge patched.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jiriburant jiriburant merged commit b63108e into main Dec 14, 2022
@jiriburant jiriburant deleted the feature/3090085_fix_bug_empty_patch branch December 14, 2022 08:15
iscai-msft added a commit that referenced this pull request Dec 15, 2022
…into add_multiapi_combiner

* 'main' of https://github.com/Azure/azure-sdk-for-python: (214 commits)
  [ML] [Pipelines] Make optional input has consistent behavior in @pipeline (#27904)
  [AutoRelease] t2-network-2022-11-29-34202(can only be merged by SDK owner) (#27721)
  add test for early available output not set is_control (#27942)
  [AutoRelease] t2-billingbenefits-2022-12-12-85945(can only be merged by SDK owner) (#27905)
  [ml] support for registry environment next version auto increment (#27920)
  Fix path validation when specifying data asset using latest tag (#27957)
  [Eventhubs] Remove Six (#27948)
  Sync eng/common directory with azure-sdk-tools for PR 4944 (#27952)
  add experimental tag to job definition class (#27949)
  [Monitor][Query] Regen with DPG (#27831)
  [Tables] Move recordings to assets repo (#27927)
  Fixed bug in sip routing. SDK shouldnt send empty patch. (#27919)
  Update prepare-pipelines.yml (#27918)
  [auto relesae] support run recording test (#27940)
  refactor:eventhub/_eventprocessor:type hint added (#26208)
  [Question Answering] Move recordings to assets repo (#27939)
  [Conversations] Move recordings to assets repo (#27938)
  [Release_sdk_status] Fix release_sdk_status for run test break (#27906)
  [Schema Registry Avro] Move recordings to assets repo (#27935)
  [Schema Registry] Move recordings to assets repo (#27934)
  ...
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.

3 participants