Repository navigation
Add model_service app resource and picker to the CLI - #7341
MarioCadenas wants to merge 9 commits into
Conversation
Maps the model_service manifest resource type to uc_securable with securable_type MODEL_SERVICE and default permission EXECUTE, and adds a catalog -> schema -> model service picker backed by AiGateway.ListModelServices. Co-authored-by: Isaac <no-reply@databricks.com>
…dd-model-service-app-resource
|
Review 1 · Pass · 1 minor, 1 trivial Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The model_service resource spec (uc_securable, MODEL_SERVICE, EXECUTE, securable_full_name) and a catalog -> schema -> model service picker using the paginating ListModelServicesAll are added and wired into the registry and prefetch, matching how uc_function is handled at every place it appears. The libs/apps tests pass, and the bundle schema and SDK already accept MODEL_SERVICE. The plugin manifests that pick serving_endpoint for the model plugins live in the AppKit templates, not in the CLI, so the CLI has nothing to switch for step 3. Not required (below the gate)
|
Integration test reportCommit: 1260857
Top 3 slowest tests (at least 2 minutes):
|
…dd-model-service-app-resource
List the system.ai model services first with a "Browse other catalogs..." entry that falls back to the catalog -> schema -> model service picker. Finding the system catalog otherwise means paging through every catalog. Co-authored-by: Isaac <no-reply@databricks.com>
…dd-model-service-app-resource
|
Review 2 · Pass · 1 minor, 1 pre-existing Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The model_service spec (uc_securable, MODEL_SERVICE, EXECUTE, catalog.schema.name) is added. It is wired into the prompt registry and prefetch, and the picker paginates via ListModelServicesAll with the system.ai shortcut. Tests pass once the blocked yaml dependency is pinned. The serving/agents plugin replacement lives in AppKit templates, outside this repo, so the CLI part looks complete. The interactive flow itself was not run by hand. Not required (below the gate)
Not required (there before this change)
|
Prefetch the system.ai model service list for model_service resources instead of the catalog list, so the first picker no longer blocks on a fetch; the catalog list is fetched on demand when browsing. Merge the single-caller helper into listSystemAIModelServices and shorten the new doc comments. Co-authored-by: Isaac <no-reply@databricks.com>
|
Review 3 · Pass · 1 minor, 1 pre-existing Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The model_service resource maps to uc_securable with MODEL_SERVICE/EXECUTE and securable_full_name. The picker lists model services in catalog.schema.name form, opening on system.ai and falling back to the catalog/schema browser, and it is registered and prefetched. Unit tests and vet pass with the yaml v3.0.5 pin. The CLI has no plugin-specific serving_endpoint lister to swap, so item 3 belongs to the AppKit template manifests, which live outside this repo. The only gap is a missing .nextchanges fragment. Not required (below the gate)
Not required (there before this change)
|
…dd-model-service-app-resource
…dd-model-service-app-resource
…dd-model-service-app-resource
Changes
Adds a
model_serviceapp resource type forapps init, plus an interactive picker for it.libs/apps/generator/generator.go:model_servicemaps touc_securablewithsecurable_type: MODEL_SERVICE. The manifest fieldname(catalog.schema.name) becomessecurable_full_name, and the default permission isEXECUTE.libs/apps/prompt: newPromptForModelService.system.aimodel services, with a "Browse other catalogs..." entry that falls back to a catalog -> schema -> model service picker (the same flow as UC functions).AiGateway.ListModelServices; all pages are fetched. Themodel-services/prefix is removed, so values arecatalog.schema.name.system.ai(403/404), or when it has no services, the picker goes straight to the catalog picker.system.ailist is loaded in the background whileapps initstarts; the catalog list loads only when browsing.--setaccepts anycatalog.schema.name(no filtering tosystem.ai).Why
universe#2571640 adds
MODEL_SERVICEas a Databricks Apps UC securable type. The serving and agents plugins move fromserving_endpointtomodel_service; that switch happens in the AppKit plugin manifests, and the CLI only needs to support the new type.The picker opens on
system.aibecause on large workspaces (e.g. dogfood: 1158 catalogs, 200 per page) reaching thesystemcatalog means paging through the catalog list. User model services in other schemas (e.g.main.default) stay reachable through "Browse other catalogs...".Known follow-ups:
MODEL_SERVICEin the appsuc_securable.securable_typeenum yet, sobundle validateshows an enum warning (not an error) for these resources until the SDK is bumped and the schema regenerated.system.ai-first behaviour.Tests
model_service;ListModelServicesInSchema(prefix stripping); thesystem.ailist with the browse entry, and the case without access.go test ./libs/apps/... ./cmd/apps/...,TestAccept/appsand golangci-lint pass locally.This pull request and its description were written by Isaac.