Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/jobs/src/v2/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,15 @@ export interface AiRuntimeTask {
* `{organization}/{repository}:{tag}`
*/
dockerImageUrl?: string | undefined;
/**
* Optional root location for MLflow artifacts logged by the run.
* If this field isn't specified the default artifact location will be in dbfs
* i.e. `dbfs:/databricks/mlflow-tracking/<experiment_id>/...`
* If dbfs access is restricted or UC is preferred this can be a custom location in UC:
* `dbfs:/Volumes/<catalog>/<schema>/<volume>/...`
* The location should be unique for each experiment.
*/
mlflowArtifactLocation?: string | undefined;
}

/**
Expand Down Expand Up @@ -5437,6 +5446,7 @@ export const unmarshalAiRuntimeTaskSchema: z.ZodType<AiRuntimeTask> = z
mlflow_run: z.string().optional(),
mlflow_experiment_directory: z.string().optional(),
docker_image_url: z.string().optional(),
mlflow_artifact_location: z.string().optional(),
})
.transform(d => ({
experiment: d.experiment,
Expand All @@ -5445,6 +5455,7 @@ export const unmarshalAiRuntimeTaskSchema: z.ZodType<AiRuntimeTask> = z
mlflowRun: d.mlflow_run,
mlflowExperimentDirectory: d.mlflow_experiment_directory,
dockerImageUrl: d.docker_image_url,
mlflowArtifactLocation: d.mlflow_artifact_location,
}));

export const unmarshalAiRuntimeTaskOutputSchema: z.ZodType<AiRuntimeTaskOutput> =
Expand Down Expand Up @@ -8948,6 +8959,7 @@ export const marshalAiRuntimeTaskSchema: z.ZodType = z
mlflowRun: z.string().optional(),
mlflowExperimentDirectory: z.string().optional(),
dockerImageUrl: z.string().optional(),
mlflowArtifactLocation: z.string().optional(),
})
.transform(d => ({
experiment: d.experiment,
Expand All @@ -8956,6 +8968,7 @@ export const marshalAiRuntimeTaskSchema: z.ZodType = z
mlflow_run: d.mlflowRun,
mlflow_experiment_directory: d.mlflowExperimentDirectory,
docker_image_url: d.dockerImageUrl,
mlflow_artifact_location: d.mlflowArtifactLocation,
}));

export const marshalAlertTaskSchema: z.ZodType = z
Expand Down
1 change: 1 addition & 0 deletions packages/networking/src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type {
GetPrivateAccessSettingsRequest,
GetVpcEndpointRequest,
GetWorkspaceNetworkOptionRequest,
GoogleApiEndpoints,
IngressNetworkPolicy,
IngressNetworkPolicy_AccountApiDestination,
IngressNetworkPolicy_AccountDatabricksOneDestination,
Expand Down
78 changes: 77 additions & 1 deletion packages/networking/src/v1/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,16 @@ export interface GcpEndpoint {
*/
serviceAttachment: string;
}
| {
$case: 'googleApiEndpoints';
/** Selected Google API hostnames, e.g. "storage.googleapis.com", "bigquery.googleapis.com". */
googleApiEndpoints: GoogleApiEndpoints;
}
| {
$case: 'allVpcScServices';
/** All Google APIs that support VPC Service Controls (a subset of all Google APIs). */
allVpcScServices: boolean;
}
| undefined;
}

Expand Down Expand Up @@ -1037,6 +1047,18 @@ export interface GetWorkspaceNetworkOptionRequest {
workspaceId?: bigint | undefined;
}

/**
* Wrapper for a list of Google API hostnames. Wrapped in a message because
* proto3 oneof does not support repeated fields directly.
*/
export interface GoogleApiEndpoints {
/**
* Google API hostnames, e.g. "storage.googleapis.com",
* "bigquery.googleapis.com". Use "googleapis.com" to cover all Google APIs.
*/
endpoints?: string[] | undefined;
}

/** The network policies applying for ingress traffic. */
export interface IngressNetworkPolicy {
/**
Expand Down Expand Up @@ -2342,6 +2364,10 @@ export const unmarshalGcpEndpointSchema: z.ZodType<GcpEndpoint> = z
.object({
psc_endpoint_uri: z.string().optional(),
service_attachment: z.string().optional(),
google_api_endpoints: z
.lazy(() => unmarshalGoogleApiEndpointsSchema)
.optional(),
all_vpc_sc_services: z.boolean().optional(),
})
.transform(d => ({
pscEndpointUri: d.psc_endpoint_uri,
Expand All @@ -2351,7 +2377,17 @@ export const unmarshalGcpEndpointSchema: z.ZodType<GcpEndpoint> = z
$case: 'serviceAttachment' as const,
serviceAttachment: d.service_attachment,
}
: undefined,
: d.google_api_endpoints !== undefined
? {
$case: 'googleApiEndpoints' as const,
googleApiEndpoints: d.google_api_endpoints,
}
: d.all_vpc_sc_services !== undefined
? {
$case: 'allVpcScServices' as const,
allVpcScServices: d.all_vpc_sc_services,
}
: undefined,
}));

export const unmarshalGcpNetworkInfoSchema: z.ZodType<GcpNetworkInfo> = z
Expand Down Expand Up @@ -2426,6 +2462,15 @@ export const unmarshalGetIpAccessListResponseSchema: z.ZodType<GetIpAccessListRe
ipAccessList: d.ip_access_list,
}));

export const unmarshalGoogleApiEndpointsSchema: z.ZodType<GoogleApiEndpoints> =
z
.object({
endpoints: z.array(z.string()).optional(),
})
.transform(d => ({
endpoints: d.endpoints,
}));

export const unmarshalIngressNetworkPolicySchema: z.ZodType<IngressNetworkPolicy> =
z
.object({
Expand Down Expand Up @@ -3788,6 +3833,14 @@ export const marshalGcpEndpointSchema: z.ZodType = z
$case: z.literal('serviceAttachment'),
serviceAttachment: z.string(),
}),
z.object({
$case: z.literal('googleApiEndpoints'),
googleApiEndpoints: z.lazy(() => marshalGoogleApiEndpointsSchema),
}),
z.object({
$case: z.literal('allVpcScServices'),
allVpcScServices: z.boolean(),
}),
])
.optional(),
})
Expand All @@ -3796,6 +3849,12 @@ export const marshalGcpEndpointSchema: z.ZodType = z
...(d.targetServices?.$case === 'serviceAttachment' && {
service_attachment: d.targetServices.serviceAttachment,
}),
...(d.targetServices?.$case === 'googleApiEndpoints' && {
google_api_endpoints: d.targetServices.googleApiEndpoints,
}),
...(d.targetServices?.$case === 'allVpcScServices' && {
all_vpc_sc_services: d.targetServices.allVpcScServices,
}),
}));

export const marshalGcpNetworkInfoSchema: z.ZodType = z
Expand Down Expand Up @@ -3848,6 +3907,14 @@ export const marshalGcpVpcEndpointInfoSchema: z.ZodType = z
service_attachment_id: d.serviceAttachmentId,
}));

export const marshalGoogleApiEndpointsSchema: z.ZodType = z
.object({
endpoints: z.array(z.string()).optional(),
})
.transform(d => ({
endpoints: d.endpoints,
}));

export const marshalIngressNetworkPolicySchema: z.ZodType = z
.object({
publicAccess: z
Expand Down Expand Up @@ -4533,10 +4600,19 @@ export const marshalWorkspaceNetworkOptionSchema: z.ZodType = z
}));

const gcpEndpointFieldMaskSchema: FieldMaskSchema = {
allVpcScServices: {wire: 'all_vpc_sc_services'},
googleApiEndpoints: {
wire: 'google_api_endpoints',
children: () => googleApiEndpointsFieldMaskSchema,
},
pscEndpointUri: {wire: 'psc_endpoint_uri'},
serviceAttachment: {wire: 'service_attachment'},
};

const googleApiEndpointsFieldMaskSchema: FieldMaskSchema = {
endpoints: {wire: 'endpoints'},
};

const updatePrivateEndpointRuleFieldMaskSchema: FieldMaskSchema = {
accountId: {wire: 'account_id'},
connectionState: {wire: 'connection_state'},
Expand Down
Loading