Skip to content

air: add the endpoint and MLmodel clients for serving a version - #7953

Draft
erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-2-registerfrom
erarpitagarwal/air-3-serve-clients
Draft

erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-2-registerfrom
erarpitagarwal/air-3-serve-clients

Conversation

@erarpitagarwal

@erarpitagarwal erarpitagarwal commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Stack (review in order; each PR is based on the one before):

  1. air: add the Model Serving client for registering a checkpoint #7951: the Model Serving client for registering a checkpoint
  2. air: add a hidden air register command #7952: air register
  3. air: add the endpoint and MLmodel clients for serving a version #7953: the endpoint and MLmodel clients for serving a version (this PR)
  4. air: add a hidden air serve command #7954: air serve

Changes

Adds the two clients databricks air serve will use. No command calls them yet, so nothing changes for users.

  • serveOnEndpoint (serveendpoint.go) makes an endpoint serve exactly one version, creating the endpoint if it doesn't exist.
    • Idempotent: an endpoint that already serves the version with the same compute isn't updated, and an update to it that's already in progress is waited for instead of sent again.
    • Safe to point at the wrong endpoint: one that serves another model, more than one entity, or is of the other kind (dedicated or not) is refused before anything waits behind its update.
    • Waiting: it returns once the endpoint accepts the create or update, or with watch once it's ready. An update someone else started is waited out first, since the endpoint takes no other until it ends.
    • Dedicated and serving compute are sent through the API each needs: provisioned model units and a compute profile, or a provisioned concurrency range and workload type.
  • readVersionPackage (servepackage.go) reads a version's MLmodel through the Files API and says what serves it: a dedicated checkpoint (an LLM task, a model_dir artifact and no entrypoint, the server's own rule), a command, or any other model. A missing, oversized or malformed file is an error.

Why

Third of four PRs. air serve, in the next PR, picks the compute from what readVersionPackage reports and then calls serveOnEndpoint.

Tests

  • go test ./cmd/air/, go vet and golangci-lint (0 issues) pass. New tests cover creating and updating, an endpoint that already serves the version, an update already in progress, another model's update and someone else's failed update, refusing another model or kind, transient failures while waiting, and reading each kind of MLmodel.

This pull request and its description were written by Isaac.

serveOnEndpoint creates or updates a serving endpoint so it serves one
version, without changing an endpoint that already does, and refuses one
that serves another model or is of the other kind. readVersionPackage reads
a version's MLmodel to tell a dedicated checkpoint from a command or any
other model. No command calls them yet; air serve uses them in a follow-up.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 2ccd407

Run: 45522393190

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 19 5:40
💚​ aws-windows-latest-4core-16gb 1 274 17 3:49
💚​ azure linux-2core-8gb 1 271 19 5:34
💚​ azure-windows-latest-4core-16gb 1 273 17 4:02
💚​ gcp linux-2core-8gb 1 272 19 6:18
💚​ gcp-windows-latest-4core-16gb 1 274 17 3:49
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:07 gcp linux-2core-8gb TestAccept
4:00 azure-windows-latest-4core-16gb TestAccept
3:50 aws linux-2core-8gb TestAccept
3:47 gcp-windows-latest-4core-16gb TestAccept
3:28 azure linux-2core-8gb TestAccept
3:26 aws-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
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.

2 participants