Skip to content

refactor: remove kind from resource class apispec - #1404

Merged
SalimKayal merged 5 commits into
salimkayal/feat/expend-resource-class-apispec-for-remote-sessionsfrom
salimkayal/refactor/remove-kind-from-resource-class-apispec
Aug 7, 2026
Merged

refactor: remove kind from resource class apispec#1404
SalimKayal merged 5 commits into
salimkayal/feat/expend-resource-class-apispec-for-remote-sessionsfrom
salimkayal/refactor/remove-kind-from-resource-class-apispec

Conversation

@SalimKayal

Copy link
Copy Markdown
Collaborator

Summary

This PR simplifies #1388
by removing the redundant kind field from resource classes.

Since every class must match its parent pool's remote kind, exposing kind on each
class is unnecessary. Local vs remote is now derived from the pool.

Changes

  • Remove kind from all resource-class schemas and reuse ResourceClassProperties
    via allOf; regenerate apispec.py.
  • Drop local from RemoteConfigurationKind; None now means local.
  • Derive class kind from pool_kind in validators and from the parent pool in
    db.py/orm.py.
  • Keep the FirecREST integer-CPU guard at validation time and add an int cast at
    session submission in notebooks/core_sessions.py.
  • Update unit tests and base API tests.

@SalimKayal
SalimKayal requested a review from leafty August 6, 2026 12:55
@SalimKayal
SalimKayal requested review from a team and sgaist as code owners August 6, 2026 12:55
@SalimKayal
SalimKayal force-pushed the salimkayal/refactor/remove-kind-from-resource-class-apispec branch from cc479fc to a2991c0 Compare August 7, 2026 11:41
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 31175062154

Warning

No base build found for commit 1856daa on salimkayal/feat/expend-resource-class-apispec-for-remote-sessions.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 85.089%

Details

  • Patch coverage: 3 uncovered changes across 1 file (25 of 28 lines covered, 89.29%).

Uncovered Changes

File Changed Covered %
components/renku_data_services/crc/db.py 5 2 40.0%
Total (6 files) 28 25 89.29%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 31721
Covered Lines: 26991
Line Coverage: 85.09%
Coverage Strength: 0.85 hits per line

💛 - Coveralls

@SalimKayal
SalimKayal merged commit ecb5aec into salimkayal/feat/expend-resource-class-apispec-for-remote-sessions Aug 7, 2026
31 of 33 checks passed
@SalimKayal
SalimKayal deleted the salimkayal/refactor/remove-kind-from-resource-class-apispec branch August 7, 2026 15:29
SalimKayal added a commit that referenced this pull request Aug 11, 2026
* feat: remove redundant kind field from resource-class API spec

* refactor: derive resource class local/remote from parent pool

* fix: components/renku_data_services/crc/apispec.py

* test: update resource pool API tests for removed kind field

* refactor: reset QuotaEnforced defaults at apispec level
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.

3 participants