feat: add patch_tenant for partial tenant updates - #1682
Conversation
Adds mgmt.tenant.patch_tenant() (sync + async), calling PATCH /v1/mgmt/tenant/patch. Unlike update(), only explicitly-provided fields are sent - omitted fields are left untouched server-side, matching the pattern already used by user.patch().
|
🐕 Review complete — View session on Shuni Portal 🐾 |
🐕 Suggested ReviewersThis PR adds partial tenant update functionality (patch_tenant) across the management API layer. Strategy focuses on: (1) Primary reviewer with broad expertise across all modified files, (2) Specialist in base tenant implementation and async patterns, (3) Test coverage specialist, and (4) Domain experts in common utilities. This ensures comprehensive review of the sync/async implementation, test quality, and utility code patterns.
Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best. |
There was a problem hiding this comment.
🐕 Shuni Review
Adds sync/async mgmt.tenant.patch_tenant() that PATCHes only explicitly-provided tenant fields, following the existing user.patch/third_party_application.patch pattern.
Actionable comments posted: 0
Merge risk: 🟢 Low: small, well-scoped addition; body composition mirrors the existing patch helpers, wire keys match sibling update/create fields, and sync+async tests cover both the minimal and fully-populated payloads.
Review scope: Full review
Reviewed files (5)
descope/management/_tenant_base.pydescope/management/common.pydescope/management/tenant.pydescope/management/tenant_async.pytests/management/test_tenant.py
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)descope/management/common.py
descope/management/tenant_async.py
descope/management/tenant.py
descope/management/_tenant_base.py
|
|
🐕 Review complete — View session on Shuni Portal 🐾 🤖 Model: |
Related Issues
related to https://github.com/descope/etc/issues/17551
Description
Adds mgmt.tenant.patch_tenant() (sync + async), calling PATCH /v1/mgmt/tenant/patch. Unlike update(), only explicitly-provided fields are sent - omitted fields are left untouched server-side, matching the pattern already used by user.patch().
Must