Skip to content

Commit 8eb96cc

Browse files
Cleanup
1 parent e0b6fad commit 8eb96cc

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

bundle/config/mutator/apply_presets.go

+13-20
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ func (m *applyPresets) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnos
4848
prefix := t.NamePrefix
4949
tags := toTagArray(t.Tags)
5050

51-
// Jobs presets.
52-
// Supported: Prefix, Tags, JobsMaxConcurrentRuns, TriggerPauseStatus
51+
// Jobs presets: Prefix, Tags, JobsMaxConcurrentRuns, TriggerPauseStatus
5352
for key, j := range r.Jobs {
5453
if j.JobSettings == nil {
5554
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
8584
}
8685
}
8786

88-
// Pipelines presets.
89-
// Supported: Prefix, PipelinesDevelopment
90-
// Not supported: Tags (as of 2024-10 not in pipelines API)
87+
// Pipelines presets: Prefix, PipelinesDevelopment
88+
// Not supported: Tags (not in API as of 2024-12)
9189
for key, p := range r.Pipelines {
9290
if p.PipelineSpec == nil {
9391
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
102100
}
103101
}
104102

105-
// Models presets
106-
// Supported: Prefix, Tags
103+
// Models presets: Prefix, Tags
107104
for key, m := range r.Models {
108105
if m.Model == nil {
109106
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
121118
}
122119
}
123120

124-
// Experiments presets
125-
// Supported: Prefix, Tags
121+
// Experiments presets: Prefix, Tags
126122
for key, e := range r.Experiments {
127123
if e.Experiment == nil {
128124
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
150146
}
151147
}
152148

153-
// Model serving endpoint presets
154-
// Supported: Prefix
155-
// Not supported: Tags (not in API as of 2024-10)
149+
// Model serving endpoint presets: Prefix
150+
// Not supported: Tags (not in API as of 2024-12)
156151
for key, e := range r.ModelServingEndpoints {
157152
if e.CreateServingEndpoint == nil {
158153
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
161156
e.Name = normalizePrefix(prefix) + e.Name
162157
}
163158

164-
// Registered models presets
165-
// Supported: Prefix
166-
// Not supported: Tags (not in API as of 2024-10)
159+
// Registered models presets: Prefix
160+
// Not supported: Tags (not in API as of 2024-12)
167161
for key, m := range r.RegisteredModels {
168162
if m.CreateRegisteredModelRequest == nil {
169163
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
172166
m.Name = normalizePrefix(prefix) + m.Name
173167
}
174168

175-
// Quality monitors presets
176-
// Supported: Schedule
177-
// Not supported: Tags (not in API as of 2024-10)
169+
// Quality monitors presets: Schedule
170+
// Not supported: Tags (not in API as of 2024-12)
178171
for key, q := range r.QualityMonitors {
179172
if q.CreateMonitor == nil {
180173
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
190183
}
191184
}
192185

193-
// Schemas: Prefix only
194-
// Not supported: Tags (as of 2024-10, only supported in Databricks UI / SQL API)
186+
// Schemas: Prefix
187+
// Not supported: Tags (only supported in Databricks UI / SQL API as of 2024-12)
195188
for key, s := range r.Schemas {
196189
if s.CreateSchema == nil {
197190
diags = diags.Extend(diag.Errorf("schema %s is not defined", key))

0 commit comments

Comments
 (0)