Skip to content

refactor(BA-7765): switch resource_policy update DTO to Unset - #14429

Merged
fregataa merged 5 commits into
mainfrom
feature/BA-7765-resource-policy-unset
Sep 9, 2026
Merged

refactor(BA-7765): switch resource_policy update DTO to Unset#14429
fregataa merged 5 commits into
mainfrom
feature/BA-7765-resource-policy-unset

Conversation

@wngh4628

@wngh4628 wngh4628 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Switch the resource_policy update DTOs from the legacy Sentinel marker to Unset (omitted = no change, null = clear).

  • common/dto/manager/v2/resource_policy/request.py: UpdateKeypairResourcePolicyInput.total_resource_slots, max_pending_session_count, max_priority, max_pending_session_resource_slots, allowed_vfolder_hosts; UpdateUserResourcePolicyInput.max_vfolder_count, max_concurrent_logins, max_quota_scope_size; and UpdateProjectResourcePolicyInput.max_vfolder_count, max_quota_scope_size change from X | Sentinel | None = SENTINEL to X | None | Unset = UNSET. Nullable fields describe "Omit to leave unchanged; null clears.", non-nullable ones stop at "Omit to leave unchanged."
  • manager/api/adapters/resource_policy/adapter.py: the ten Sentinel branches are replaced with TriState.from_unset(...) (nullable columns) or OptionalState.from_unset(...) (non-nullable columns), using .map(...) where a value is converted.
  • tests/unit/common/dto/manager/v2/resource_policy/test_request.py, tests/unit/manager/api/gql/resource_policy_v2/test_max_priority.py: SENTINEL/Sentinel assertions become UNSET/Unset.

🤖 Generated with Claude Code

https://claude.ai/code/session_017idp6rKVV33XrzJG1yWYXo


📚 Documentation preview 📚: https://sorna--14429.org.readthedocs.build/en/14429/


📚 Documentation preview 📚: https://sorna-ko--14429.org.readthedocs.build/ko/14429/

@wngh4628
wngh4628 requested a review from a team as a code owner September 8, 2026 07:16
@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component comp:common Related to Common component area:docs Documentations labels Sep 8, 2026
@wngh4628
wngh4628 force-pushed the feature/BA-7765-resource-policy-unset branch from a977f97 to 3197ee5 Compare September 8, 2026 07:28
wngh4628 and others added 3 commits September 8, 2026 07:31
Co-authored-by: octodog <mu001@lablup.com>
Co-authored-by: octodog <mu001@lablup.com>
@github-actions github-actions Bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Sep 9, 2026
@wngh4628
wngh4628 marked this pull request as draft September 9, 2026 02:04
@wngh4628
wngh4628 marked this pull request as ready for review September 9, 2026 05:33
@fregataa
fregataa merged commit a2121ac into main Sep 9, 2026
48 checks passed
@fregataa
fregataa deleted the feature/BA-7765-resource-policy-unset branch September 9, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants