Skip to content

feat: unify serverless create on graphql saveEndpoint#1

Closed
TimPietruskyRunPod wants to merge 1 commit into
brosenpod:ce1579from
runpod:fix/ce1579-unify-saveendpoint
Closed

feat: unify serverless create on graphql saveEndpoint#1
TimPietruskyRunPod wants to merge 1 commit into
brosenpod:ce1579from
runpod:fix/ce1579-unify-saveendpoint

Conversation

@TimPietruskyRunPod

Copy link
Copy Markdown

builds on top of runpod#276. unifies all of serverless create onto the graphql saveEndpoint mutation instead of routing some paths through rest and others through graphql.

why

runpod#276 added --model-reference, which forces the graphql path. but the bifurcation meant the path you hit (template → rest, model/hub → graphql) silently decided which flags actually worked. on the graphql paths, --idle-timeout, --scale-by/--scale-threshold, --execution-timeout, --min-cuda-version, --network-volume-ids, and --flash-boot were silently dropped. the web console uses saveEndpoint for everything, and EndpointInput is a superset of the rest fields — so unifying on it is the way to get every capability on one path with nothing dropped.

what changed

  • single path: template, hub, model-reference, cpu, and gpu all go through saveEndpoint. removed the now-unused rest CreateEndpoint.
  • no silent drops: every flag maps to EndpointInput. conflicting flags now error instead of being ignored (e.g. --network-volume-id + --network-volume-ids).
  • gpu id translation: saveEndpoint.gpuIds wants gpu pool ids (ADA_24), not the gpu type ids (NVIDIA A40) that gpu list / --gpu-id use. --gpu-id is now translated via serverlessGpuPools (type id or pool id both work).
  • cpu: selected via instanceIds (new --instance-id, default cpu3g-4-16); saveEndpoint has no computeType.
  • flash boot: maps to the flashBootType enum, so --flash-boot=false is honored without the old post-create rest patch.
  • multi-region volumes: --network-volume-ids sent as [{networkVolumeId}].
  • name: saveEndpoint requires a name (String!, min 3) and never auto-generates one, so a default is generated client-side when --name is omitted.
  • output: create response now echoes instanceIds and networkVolumeIds so cpu/multi-region endpoints are visible.

testing

  • unit tests updated (table-driven validations, serialization); go test ./... passes.
  • e2e against the live api (all resources cleaned up): gpu type-id→pool-id translation (NVIDIA GeForce RTX 4090ADA_24, NVIDIA A40AMPERE_48), cpu default + explicit instance, flags-take-effect verified server-side via graphql (idleTimeout/scaler/executionTimeoutMs/flashBootType=OFF), single + repeated model references, name auto-generation, data-center-ids, single + multi-region volumes, hub deploy, and all 6 validation/error paths.

docs and AGENTS.md updated.

route all serverless creates (template, hub, model-reference, cpu, gpu)
through the saveEndpoint mutation instead of bifurcating between rest and
graphql. this fixes flags being silently dropped on the model/hub paths
and gives every flag the full capability set on one path (matching the
web console).

- map all flags to EndpointInput: idle-timeout, scale-by/threshold,
  execution-timeout, min-cuda-version, flash-boot (flashBootType enum),
  network-volume-ids (multi-region), model-reference
- translate --gpu-id (gpu type id, e.g. 'NVIDIA A40') to the gpu pool id
  (e.g. AMPERE_48) saveEndpoint expects, via serverlessGpuPools
- cpu via instanceIds (--instance-id, default cpu3g-4-16); no computeType
- generate a default name when --name is omitted (saveEndpoint requires it)
- echo instanceIds and networkVolumeIds in the create output
- remove the now-unused rest CreateEndpoint path
- validate conflicting flags instead of dropping them
@TimPietruskyRunPod

Copy link
Copy Markdown
Author

moving this to runpod/runpodctl

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