Skip to content

Commit db34f10

Browse files
committed
fixes
1 parent 1165def commit db34f10

20 files changed

+44
-56
lines changed

acceptance/bundle/refschema/out.fields.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ resources.apps.*.effective_budget_policy_id string ALL
2727
resources.apps.*.effective_user_api_scopes []string ALL
2828
resources.apps.*.effective_user_api_scopes[*] string ALL
2929
resources.apps.*.id string ALL
30+
resources.apps.*.lifecycle resources.Lifecycle INPUT
31+
resources.apps.*.lifecycle.prevent_destroy bool INPUT
3032
resources.apps.*.modified_status string INPUT
3133
resources.apps.*.name string ALL
3234
resources.apps.*.oauth2_app_client_id string ALL
@@ -87,6 +89,8 @@ resources.database_catalogs.*.create_database_if_not_exists bool ALL
8789
resources.database_catalogs.*.database_instance_name string ALL
8890
resources.database_catalogs.*.database_name string ALL
8991
resources.database_catalogs.*.id string INPUT
92+
resources.database_catalogs.*.lifecycle resources.Lifecycle INPUT
93+
resources.database_catalogs.*.lifecycle.prevent_destroy bool INPUT
9094
resources.database_catalogs.*.modified_status string INPUT
9195
resources.database_catalogs.*.name string ALL
9296
resources.database_catalogs.*.uid string ALL
@@ -109,6 +113,8 @@ resources.database_instances.*.effective_stopped bool ALL
109113
resources.database_instances.*.enable_pg_native_login bool ALL
110114
resources.database_instances.*.enable_readable_secondaries bool ALL
111115
resources.database_instances.*.id string INPUT
116+
resources.database_instances.*.lifecycle resources.Lifecycle INPUT
117+
resources.database_instances.*.lifecycle.prevent_destroy bool INPUT
112118
resources.database_instances.*.modified_status string INPUT
113119
resources.database_instances.*.name string ALL
114120
resources.database_instances.*.node_count int ALL
@@ -294,6 +300,8 @@ resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients compute.Clien
294300
resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients.jobs bool INPUT STATE
295301
resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients.notebooks bool INPUT STATE
296302
resources.jobs.*.job_id int64 REMOTE
303+
resources.jobs.*.lifecycle resources.Lifecycle INPUT
304+
resources.jobs.*.lifecycle.prevent_destroy bool INPUT
297305
resources.jobs.*.max_concurrent_runs int INPUT STATE
298306
resources.jobs.*.modified_status string INPUT
299307
resources.jobs.*.name string INPUT STATE
@@ -2082,6 +2090,8 @@ resources.pipelines.*.libraries[*].maven.repo string INPUT STATE
20822090
resources.pipelines.*.libraries[*].notebook *pipelines.NotebookLibrary INPUT STATE
20832091
resources.pipelines.*.libraries[*].notebook.path string INPUT STATE
20842092
resources.pipelines.*.libraries[*].whl string INPUT STATE
2093+
resources.pipelines.*.lifecycle resources.Lifecycle INPUT
2094+
resources.pipelines.*.lifecycle.prevent_destroy bool INPUT
20852095
resources.pipelines.*.modified_status string INPUT
20862096
resources.pipelines.*.name string ALL
20872097
resources.pipelines.*.notifications []pipelines.Notifications INPUT STATE
@@ -2389,6 +2399,8 @@ resources.schemas.*.grants[*].principal string INPUT
23892399
resources.schemas.*.grants[*].privileges []resources.SchemaGrantPrivilege INPUT
23902400
resources.schemas.*.grants[*].privileges[*] resources.SchemaGrantPrivilege INPUT
23912401
resources.schemas.*.id string INPUT
2402+
resources.schemas.*.lifecycle resources.Lifecycle INPUT
2403+
resources.schemas.*.lifecycle.prevent_destroy bool INPUT
23922404
resources.schemas.*.metastore_id string REMOTE
23932405
resources.schemas.*.modified_status string INPUT
23942406
resources.schemas.*.name string ALL
@@ -2422,6 +2434,8 @@ resources.sql_warehouses.*.health.summary string REMOTE
24222434
resources.sql_warehouses.*.id string INPUT REMOTE
24232435
resources.sql_warehouses.*.instance_profile_arn string ALL
24242436
resources.sql_warehouses.*.jdbc_url string REMOTE
2437+
resources.sql_warehouses.*.lifecycle resources.Lifecycle INPUT
2438+
resources.sql_warehouses.*.lifecycle.prevent_destroy bool INPUT
24252439
resources.sql_warehouses.*.max_num_clusters int ALL
24262440
resources.sql_warehouses.*.min_num_clusters int ALL
24272441
resources.sql_warehouses.*.modified_status string INPUT
@@ -2494,6 +2508,8 @@ resources.synced_database_tables.*.database_instance_name string ALL
24942508
resources.synced_database_tables.*.effective_database_instance_name string ALL
24952509
resources.synced_database_tables.*.effective_logical_database_name string ALL
24962510
resources.synced_database_tables.*.id string INPUT
2511+
resources.synced_database_tables.*.lifecycle resources.Lifecycle INPUT
2512+
resources.synced_database_tables.*.lifecycle.prevent_destroy bool INPUT
24972513
resources.synced_database_tables.*.logical_database_name string ALL
24982514
resources.synced_database_tables.*.modified_status string INPUT
24992515
resources.synced_database_tables.*.name string ALL
@@ -2527,6 +2543,8 @@ resources.volumes.*.grants[*].principal string INPUT
25272543
resources.volumes.*.grants[*].privileges []resources.VolumeGrantPrivilege INPUT
25282544
resources.volumes.*.grants[*].privileges[*] resources.VolumeGrantPrivilege INPUT
25292545
resources.volumes.*.id string INPUT
2546+
resources.volumes.*.lifecycle resources.Lifecycle INPUT
2547+
resources.volumes.*.lifecycle.prevent_destroy bool INPUT
25302548
resources.volumes.*.metastore_id string REMOTE
25312549
resources.volumes.*.modified_status string INPUT
25322550
resources.volumes.*.name string ALL

bundle/config/resources/apps.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type AppPermission struct {
2424

2525
type App struct {
2626
BaseResource
27+
apps.App // nolint App struct also defines Id and URL field with the same json tag "id" and "url"
2728

2829
// SourceCodePath is a required field used by DABs to point to Databricks app source code
2930
// on local disk and to the corresponding workspace path during app deployment.
@@ -36,9 +37,6 @@ type App struct {
3637
Config map[string]any `json:"config,omitempty"`
3738

3839
Permissions []AppPermission `json:"permissions,omitempty"`
39-
40-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
41-
apps.App // nolint App struct also defines Id and URL field with the same json tag "id" and "url"
4240
}
4341

4442
func (a *App) UnmarshalJSON(b []byte) error {

bundle/config/resources/base.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ type BaseResource struct {
55
ID string `json:"id,omitempty" bundle:"readonly"`
66
ModifiedStatus ModifiedStatus `json:"modified_status,omitempty" bundle:"internal"`
77
URL string `json:"url,omitempty" bundle:"internal"`
8+
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
89
}

bundle/config/resources/clusters.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ type ClusterPermission struct {
2424

2525
type Cluster struct {
2626
BaseResource
27+
compute.ClusterSpec
2728

2829
Permissions []ClusterPermission `json:"permissions,omitempty"`
29-
30-
compute.ClusterSpec
31-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
3230
}
3331

3432
func (s *Cluster) UnmarshalJSON(b []byte) error {

bundle/config/resources/dashboard.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ type DashboardConfig struct {
4646

4747
type Dashboard struct {
4848
BaseResource
49-
Permissions []DashboardPermission `json:"permissions,omitempty"`
50-
5149
DashboardConfig
52-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
50+
51+
Permissions []DashboardPermission `json:"permissions,omitempty"`
5352

5453
// FilePath points to the local `.lvdash.json` file containing the dashboard definition.
5554
// This is inlined into serialized_dashboard during deployment. The file_path is kept around

bundle/config/resources/database_catalog.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import (
1212

1313
type DatabaseCatalog struct {
1414
BaseResource
15-
1615
database.DatabaseCatalog
17-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
1816
}
1917

2018
func (d *DatabaseCatalog) Exists(ctx context.Context, w *databricks.WorkspaceClient, name string) (bool, error) {

bundle/config/resources/database_instance.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ type DatabaseInstancePermission struct {
2424

2525
type DatabaseInstance struct {
2626
BaseResource
27+
database.DatabaseInstance
2728

2829
Permissions []DatabaseInstancePermission `json:"permissions,omitempty"`
29-
30-
database.DatabaseInstance
31-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
3230
}
3331

3432
func (d *DatabaseInstance) Exists(ctx context.Context, w *databricks.WorkspaceClient, name string) (bool, error) {

bundle/config/resources/job.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ type JobPermission struct {
2525

2626
type Job struct {
2727
BaseResource
28+
jobs.JobSettings
2829

2930
Permissions []JobPermission `json:"permissions,omitempty"`
30-
31-
jobs.JobSettings
32-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
3331
}
3432

3533
func (j *Job) UnmarshalJSON(b []byte) error {

bundle/config/resources/mlflow_experiment.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ type MlflowExperimentPermission struct {
2424

2525
type MlflowExperiment struct {
2626
BaseResource
27+
ml.Experiment
2728

2829
Permissions []MlflowExperimentPermission `json:"permissions,omitempty"`
29-
30-
ml.Experiment
31-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
3230
}
3331

3432
func (s *MlflowExperiment) UnmarshalJSON(b []byte) error {

bundle/config/resources/mlflow_model.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ type MlflowModelPermission struct {
2424

2525
type MlflowModel struct {
2626
BaseResource
27+
ml.CreateModelRequest
2728

2829
Permissions []MlflowModelPermission `json:"permissions,omitempty"`
29-
30-
ml.CreateModelRequest
31-
Lifecycle Lifecycle `json:"lifecycle,omitempty"`
3230
}
3331

3432
func (s *MlflowModel) UnmarshalJSON(b []byte) error {

0 commit comments

Comments
 (0)