Skip to content

refactoring: Introduce Reservation dataclass#1053

Merged
jamOne- merged 17 commits intoAI-Hypercomputer:mainfrom
jamOne-:reservation-refactor
Feb 13, 2026
Merged

refactoring: Introduce Reservation dataclass#1053
jamOne- merged 17 commits intoAI-Hypercomputer:mainfrom
jamOne-:reservation-refactor

Conversation

@jamOne-
Copy link
Collaborator

@jamOne- jamOne- commented Feb 13, 2026

Description

Main goal: introduce Reservation data class containing all information XPK reads from the GCE Reservation resource.

Other changes:

  • One entry-point function for fetching the reservations by the ReservationLink. Easily cache-able.
  • TBH XPK currently don't require acceleratorInfo, nor the real Reservation capacity info (count, inUseCount), but I'll need it soon.
  • Behavioral change: reservations without READY status are treated as incorrect, previously we didn't check that.

Reservations API reference: https://docs.cloud.google.com/compute/docs/reference/rest/v1/reservations.

Issue

Part of b/477114712.

I need this change to focus on business logic in the better reservations handling logic, where I'll ensure Reservation capacities and machines types are correct.

Testing

  • unit tests,
  • goldens,
  • manually tested with Super-slicing reservation.

@jamOne- jamOne- changed the title Reservation refactor refactoring: Introduce Reservation dataclass Feb 13, 2026
@jamOne- jamOne- marked this pull request as ready for review February 13, 2026 14:55
@jamOne- jamOne- enabled auto-merge February 13, 2026 15:08
@jamOne- jamOne- added this pull request to the merge queue Feb 13, 2026
Merged via the queue into AI-Hypercomputer:main with commit 3bac5dc Feb 13, 2026
51 checks passed
@jamOne- jamOne- deleted the reservation-refactor branch February 13, 2026 15:12
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.

4 participants