Skip to content

feat: add patch_tenant for partial tenant updates - #1682

Merged
ruvenzx merged 3 commits into
mainfrom
feat/patch-tenant
Sep 1, 2026
Merged

feat: add patch_tenant for partial tenant updates#1682
ruvenzx merged 3 commits into
mainfrom
feat/patch-tenant

Conversation

@ruvenzx

@ruvenzx ruvenzx commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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

  • Tests
  • Documentation (if applicable)

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().
@shuni-bot

shuni-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot

shuni-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🐕 Suggested Reviewers

This 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.

Reviewer Reason
dorsha Primary reviewer with 19 commits across all 4 changed file categories (common.py, tenant.py, tenant_async.py, _tenant_base.py). Broad expertise to evaluate overall architecture and consistency of the patch_tenant implementation across sync/async variants.
LioriE Deep expertise in _tenant_base.py (where the core implementation likely resides) and 5 commits across tenant sync/async files. Essential for reviewing the base class design and ensuring async patterns match existing conventions.
omercnet Specialist in tenant.py and test suite with 2 commits. Critical for validating that tests properly cover the new patch_tenant functionality and integration with existing tenant operations.
chris4490 Recent contributor to common.py utilities. Useful for reviewing any common utility patterns used by patch_tenant and ensuring alignment with current utility standards.

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.

@shuni-bot shuni-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐕 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.py
  • descope/management/common.py
  • descope/management/tenant.py
  • descope/management/tenant_async.py
  • tests/management/test_tenant.py

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Coverage report

The coverage rate went from 98.26% to 98.26% ⬆️

100% of new lines are covered.

Diff Coverage details (click to unfold)

descope/management/common.py

100% of new lines are covered (99.79% of the complete file).

descope/management/tenant_async.py

100% of new lines are covered (100% of the complete file).

descope/management/tenant.py

100% of new lines are covered (100% of the complete file).

descope/management/_tenant_base.py

100% of new lines are covered (100% of the complete file).

dorsha
dorsha previously approved these changes Sep 1, 2026
@shuni-bot

shuni-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-sonnet-5

@ruvenzx
ruvenzx requested a review from dorsha September 1, 2026 07:43
@ruvenzx ruvenzx self-assigned this Sep 1, 2026

@shuni-bot shuni-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐕 Shuni Review

No new issues found.

🤖 Model: claude-sonnet-5


Review scope: Incremental re-review

Reviewed new changes (1)
  • README.md
Previously reviewed and unchanged: 5 files.

@ruvenzx
ruvenzx enabled auto-merge (squash) September 1, 2026 07:47
@ruvenzx
ruvenzx merged commit 5d1bca3 into main Sep 1, 2026
38 checks passed
@ruvenzx
ruvenzx deleted the feat/patch-tenant branch September 1, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants