This commit is contained in:
Lennart Kats 2024-12-20 09:44:01 +01:00
parent e0b6faddbe
commit 8eb96ccb7d
No known key found for this signature in database
GPG Key ID: 1EB8B57673197023
1 changed files with 13 additions and 20 deletions

View File

@ -48,8 +48,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
prefix := t.NamePrefix prefix := t.NamePrefix
tags := toTagArray(t.Tags) tags := toTagArray(t.Tags)
// Jobs presets. // Jobs presets: Prefix, Tags, JobsMaxConcurrentRuns, TriggerPauseStatus
// Supported: Prefix, Tags, JobsMaxConcurrentRuns, TriggerPauseStatus
for key, j := range r.Jobs { for key, j := range r.Jobs {
if j.JobSettings == nil { if j.JobSettings == nil {
diags = diags.Extend(diag.Errorf("job %s is not defined", key)) diags = diags.Extend(diag.Errorf("job %s is not defined", key))
@ -85,9 +84,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
} }
} }
// Pipelines presets. // Pipelines presets: Prefix, PipelinesDevelopment
// Supported: Prefix, PipelinesDevelopment // Not supported: Tags (not in API as of 2024-12)
// Not supported: Tags (as of 2024-10 not in pipelines API)
for key, p := range r.Pipelines { for key, p := range r.Pipelines {
if p.PipelineSpec == nil { if p.PipelineSpec == nil {
diags = diags.Extend(diag.Errorf("pipeline %s is not defined", key)) diags = diags.Extend(diag.Errorf("pipeline %s is not defined", key))
@ -102,8 +100,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
} }
} }
// Models presets // Models presets: Prefix, Tags
// Supported: Prefix, Tags
for key, m := range r.Models { for key, m := range r.Models {
if m.Model == nil { if m.Model == nil {
diags = diags.Extend(diag.Errorf("model %s is not defined", key)) diags = diags.Extend(diag.Errorf("model %s is not defined", key))
@ -121,8 +118,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
} }
} }
// Experiments presets // Experiments presets: Prefix, Tags
// Supported: Prefix, Tags
for key, e := range r.Experiments { for key, e := range r.Experiments {
if e.Experiment == nil { if e.Experiment == nil {
diags = diags.Extend(diag.Errorf("experiment %s is not defined", key)) diags = diags.Extend(diag.Errorf("experiment %s is not defined", key))
@ -150,9 +146,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
} }
} }
// Model serving endpoint presets // Model serving endpoint presets: Prefix
// Supported: Prefix // Not supported: Tags (not in API as of 2024-12)
// Not supported: Tags (not in API as of 2024-10)
for key, e := range r.ModelServingEndpoints { for key, e := range r.ModelServingEndpoints {
if e.CreateServingEndpoint == nil { if e.CreateServingEndpoint == nil {
diags = diags.Extend(diag.Errorf("model serving endpoint %s is not defined", key)) diags = diags.Extend(diag.Errorf("model serving endpoint %s is not defined", key))
@ -161,9 +156,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
e.Name = normalizePrefix(prefix) + e.Name e.Name = normalizePrefix(prefix) + e.Name
} }
// Registered models presets // Registered models presets: Prefix
// Supported: Prefix // Not supported: Tags (not in API as of 2024-12)
// Not supported: Tags (not in API as of 2024-10)
for key, m := range r.RegisteredModels { for key, m := range r.RegisteredModels {
if m.CreateRegisteredModelRequest == nil { if m.CreateRegisteredModelRequest == nil {
diags = diags.Extend(diag.Errorf("registered model %s is not defined", key)) diags = diags.Extend(diag.Errorf("registered model %s is not defined", key))
@ -172,9 +166,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
m.Name = normalizePrefix(prefix) + m.Name m.Name = normalizePrefix(prefix) + m.Name
} }
// Quality monitors presets // Quality monitors presets: Schedule
// Supported: Schedule // Not supported: Tags (not in API as of 2024-12)
// Not supported: Tags (not in API as of 2024-10)
for key, q := range r.QualityMonitors { for key, q := range r.QualityMonitors {
if q.CreateMonitor == nil { if q.CreateMonitor == nil {
diags = diags.Extend(diag.Errorf("quality monitor %s is not defined", key)) diags = diags.Extend(diag.Errorf("quality monitor %s is not defined", key))
@ -190,8 +183,8 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
} }
} }
// Schemas: Prefix only // Schemas: Prefix
// Not supported: Tags (as of 2024-10, only supported in Databricks UI / SQL API) // Not supported: Tags (only supported in Databricks UI / SQL API as of 2024-12)
for key, s := range r.Schemas { for key, s := range r.Schemas {
if s.CreateSchema == nil { if s.CreateSchema == nil {
diags = diags.Extend(diag.Errorf("schema %s is not defined", key)) diags = diags.Extend(diag.Errorf("schema %s is not defined", key))