Skip to content

add shell rental#1739

Merged
luke-lombardi merged 3 commits into
mainfrom
ll/mp-improvements
Jul 3, 2026
Merged

add shell rental#1739
luke-lombardi merged 3 commits into
mainfrom
ll/mp-improvements

Conversation

@luke-lombardi

@luke-lombardi luke-lombardi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Adds marketplace rentals so buyers can reserve GPUs on a specific seller machine and launch machine‑pinned shells or pods. Includes rental APIs, scheduler pinning and wait logic, Redis-backed rentals with per-machine locking, usage emission for billing, and SDK/OpenAPI updates with pricing.

  • New Features

    • Rental model and Redis storage with per-buyer/machine indexes and a per-machine lock; emits rental usage during reconcile with a timeout.
    • Gateway APIs: create/list/delete rentals and POST /marketplace/rentals/{rental_id}/launch for shells/pods; OpenAPI/proto generated.
    • Machine pinning for shells/pods via StubConfigV1.machine_id and types.ContainerRequest.machine_id; scheduler restricts to the pinned worker and waits if busy; new unit tests.
    • SDK updates: rental messages, machine_id, and price_per_gpu_hour_cents on listings/offers.
  • Refactors

    • Moved empty stub object helper to pkg/abstractions/common; gateway uses it.
    • Added Redis key constants and wiring in gateway compute service (RedisClient, rentalUsage).
    • Proto/offer shaping tweaks and test expansions.

Written for commit a4729c0. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai 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.

9 issues found across 30 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread pkg/scheduler/scheduler.go Outdated
Comment thread pkg/abstractions/common/stub_object.go
Comment thread pkg/gateway/services/compute/rentals.go
Comment thread pkg/gateway/services/compute/rentals.go
Comment thread pkg/scheduler/scheduler.go Outdated
Comment thread pkg/gateway/services/compute/reconcile.go Outdated
Comment thread pkg/gateway/services/compute/rentals.go
Comment thread pkg/compute/ids.go
Comment thread pkg/abstractions/shell/shell.go

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 10 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread pkg/gateway/services/compute/rentals.go Outdated
@luke-lombardi luke-lombardi merged commit ba8e4c5 into main Jul 3, 2026
4 checks passed
@luke-lombardi luke-lombardi deleted the ll/mp-improvements branch July 3, 2026 13:12
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.

1 participant