-
Notifications
You must be signed in to change notification settings - Fork 146
Added support for lifecycle.started option #4672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4131876
dec451b
006910a
da107eb
0fa3370
a79625c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| bundle: | ||
| name: test_lifecycle_started | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| name: my_job | ||
| lifecycle: | ||
| started: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Error: lifecycle.started is not supported for resources.jobs.my_job; it is only supported for apps, clusters, and sql_warehouses | ||
| in databricks.yml:9:18 | ||
|
|
||
|
|
||
| Exit code: 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| errcode $CLI bundle plan |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Local = true | ||
| Cloud = false | ||
|
|
||
| Ignore = [".databricks"] | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ resources.alerts.*.file_path string INPUT | |
| resources.alerts.*.id string ALL | ||
| resources.alerts.*.lifecycle resources.Lifecycle INPUT | ||
| resources.alerts.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.alerts.*.lifecycle.started *bool INPUT | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question, should we have separate Lifecycle struct (LifecycleWithStarted) that has 'started' field so that the schema reflects which types support it? There is a risk down the road of combinatorial explosion - we can revisit later if we end up there. From users' perspective (this schema, json schema, Python schema) I think it's best to have this type definition tight. cc @pietern |
||
| resources.alerts.*.lifecycle_state sql.AlertLifecycleState ALL | ||
| resources.alerts.*.modified_status string INPUT | ||
| resources.alerts.*.owner_user_name string ALL | ||
|
|
@@ -100,14 +101,14 @@ resources.apps.*.compute_status *apps.ComputeStatus ALL | |
| resources.apps.*.compute_status.active_instances int ALL | ||
| resources.apps.*.compute_status.message string ALL | ||
| resources.apps.*.compute_status.state apps.ComputeState ALL | ||
| resources.apps.*.config *resources.AppConfig INPUT | ||
| resources.apps.*.config.command []string INPUT | ||
| resources.apps.*.config.command[*] string INPUT | ||
| resources.apps.*.config.env []resources.AppEnvVar INPUT | ||
| resources.apps.*.config.env[*] resources.AppEnvVar INPUT | ||
| resources.apps.*.config.env[*].name string INPUT | ||
| resources.apps.*.config.env[*].value string INPUT | ||
| resources.apps.*.config.env[*].value_from string INPUT | ||
| resources.apps.*.config *resources.AppConfig INPUT STATE | ||
| resources.apps.*.config.command []string INPUT STATE | ||
| resources.apps.*.config.command[*] string INPUT STATE | ||
| resources.apps.*.config.env []resources.AppEnvVar INPUT STATE | ||
| resources.apps.*.config.env[*] resources.AppEnvVar INPUT STATE | ||
| resources.apps.*.config.env[*].name string INPUT STATE | ||
| resources.apps.*.config.env[*].value string INPUT STATE | ||
| resources.apps.*.config.env[*].value_from string INPUT STATE | ||
| resources.apps.*.create_time string ALL | ||
| resources.apps.*.creator string ALL | ||
| resources.apps.*.default_source_code_path string ALL | ||
|
|
@@ -119,18 +120,19 @@ resources.apps.*.effective_user_api_scopes[*] string ALL | |
| resources.apps.*.git_repository *apps.GitRepository ALL | ||
| resources.apps.*.git_repository.provider string ALL | ||
| resources.apps.*.git_repository.url string ALL | ||
| resources.apps.*.git_source *apps.GitSource INPUT | ||
| resources.apps.*.git_source.branch string INPUT | ||
| resources.apps.*.git_source.commit string INPUT | ||
| resources.apps.*.git_source.git_repository *apps.GitRepository INPUT | ||
| resources.apps.*.git_source.git_repository.provider string INPUT | ||
| resources.apps.*.git_source.git_repository.url string INPUT | ||
| resources.apps.*.git_source.resolved_commit string INPUT | ||
| resources.apps.*.git_source.source_code_path string INPUT | ||
| resources.apps.*.git_source.tag string INPUT | ||
| resources.apps.*.git_source *apps.GitSource INPUT STATE | ||
| resources.apps.*.git_source.branch string INPUT STATE | ||
| resources.apps.*.git_source.commit string INPUT STATE | ||
| resources.apps.*.git_source.git_repository *apps.GitRepository INPUT STATE | ||
| resources.apps.*.git_source.git_repository.provider string INPUT STATE | ||
| resources.apps.*.git_source.git_repository.url string INPUT STATE | ||
| resources.apps.*.git_source.resolved_commit string INPUT STATE | ||
| resources.apps.*.git_source.source_code_path string INPUT STATE | ||
| resources.apps.*.git_source.tag string INPUT STATE | ||
| resources.apps.*.id string ALL | ||
| resources.apps.*.lifecycle resources.Lifecycle INPUT | ||
| resources.apps.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.apps.*.lifecycle.started *bool INPUT | ||
| resources.apps.*.modified_status string INPUT | ||
| resources.apps.*.name string ALL | ||
| resources.apps.*.oauth2_app_client_id string ALL | ||
|
|
@@ -206,8 +208,9 @@ resources.apps.*.resources[*].uc_securable.securable_type apps.AppResourceUcSecu | |
| resources.apps.*.service_principal_client_id string ALL | ||
| resources.apps.*.service_principal_id int64 ALL | ||
| resources.apps.*.service_principal_name string ALL | ||
| resources.apps.*.source_code_path string INPUT | ||
| resources.apps.*.source_code_path string INPUT STATE | ||
| resources.apps.*.space string ALL | ||
| resources.apps.*.started bool STATE | ||
| resources.apps.*.update_time string ALL | ||
| resources.apps.*.updater string ALL | ||
| resources.apps.*.url string ALL | ||
|
|
@@ -242,6 +245,7 @@ resources.catalogs.*.id string INPUT | |
| resources.catalogs.*.isolation_mode catalog.CatalogIsolationMode REMOTE | ||
| resources.catalogs.*.lifecycle resources.Lifecycle INPUT | ||
| resources.catalogs.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.catalogs.*.lifecycle.started *bool INPUT | ||
| resources.catalogs.*.metastore_id string REMOTE | ||
| resources.catalogs.*.modified_status string INPUT | ||
| resources.catalogs.*.name string ALL | ||
|
|
@@ -387,6 +391,7 @@ resources.clusters.*.last_restarted_time int64 REMOTE | |
| resources.clusters.*.last_state_loss_time int64 REMOTE | ||
| resources.clusters.*.lifecycle resources.Lifecycle INPUT | ||
| resources.clusters.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.clusters.*.lifecycle.started *bool INPUT | ||
| resources.clusters.*.modified_status string INPUT | ||
| resources.clusters.*.node_type_id string ALL | ||
| resources.clusters.*.num_workers int ALL | ||
|
|
@@ -517,6 +522,7 @@ resources.clusters.*.spec.workload_type.clients.notebooks bool REMOTE | |
| resources.clusters.*.ssh_public_keys []string ALL | ||
| resources.clusters.*.ssh_public_keys[*] string ALL | ||
| resources.clusters.*.start_time int64 REMOTE | ||
| resources.clusters.*.started bool STATE | ||
| resources.clusters.*.state compute.State REMOTE | ||
| resources.clusters.*.state_message string REMOTE | ||
| resources.clusters.*.terminated_time int64 REMOTE | ||
|
|
@@ -553,6 +559,7 @@ resources.dashboards.*.file_path string INPUT | |
| resources.dashboards.*.id string INPUT | ||
| resources.dashboards.*.lifecycle resources.Lifecycle INPUT | ||
| resources.dashboards.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.dashboards.*.lifecycle.started *bool INPUT | ||
| resources.dashboards.*.lifecycle_state dashboards.LifecycleState ALL | ||
| resources.dashboards.*.modified_status string INPUT | ||
| resources.dashboards.*.parent_path string ALL | ||
|
|
@@ -581,6 +588,7 @@ resources.database_catalogs.*.database_name string ALL | |
| resources.database_catalogs.*.id string INPUT | ||
| resources.database_catalogs.*.lifecycle resources.Lifecycle INPUT | ||
| resources.database_catalogs.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.database_catalogs.*.lifecycle.started *bool INPUT | ||
| resources.database_catalogs.*.modified_status string INPUT | ||
| resources.database_catalogs.*.name string ALL | ||
| resources.database_catalogs.*.uid string ALL | ||
|
|
@@ -615,6 +623,7 @@ resources.database_instances.*.enable_readable_secondaries bool ALL | |
| resources.database_instances.*.id string INPUT | ||
| resources.database_instances.*.lifecycle resources.Lifecycle INPUT | ||
| resources.database_instances.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.database_instances.*.lifecycle.started *bool INPUT | ||
| resources.database_instances.*.modified_status string INPUT | ||
| resources.database_instances.*.name string ALL | ||
| resources.database_instances.*.node_count int ALL | ||
|
|
@@ -653,6 +662,7 @@ resources.experiments.*.id string INPUT | |
| resources.experiments.*.last_update_time int64 REMOTE | ||
| resources.experiments.*.lifecycle resources.Lifecycle INPUT | ||
| resources.experiments.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.experiments.*.lifecycle.started *bool INPUT | ||
| resources.experiments.*.lifecycle_stage string REMOTE | ||
| resources.experiments.*.modified_status string INPUT | ||
| resources.experiments.*.name string ALL | ||
|
|
@@ -719,6 +729,7 @@ resources.external_locations.*.id string INPUT | |
| resources.external_locations.*.isolation_mode catalog.IsolationMode REMOTE | ||
| resources.external_locations.*.lifecycle resources.Lifecycle INPUT | ||
| resources.external_locations.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.external_locations.*.lifecycle.started *bool INPUT | ||
| resources.external_locations.*.metastore_id string REMOTE | ||
| resources.external_locations.*.modified_status string INPUT | ||
| resources.external_locations.*.name string ALL | ||
|
|
@@ -908,6 +919,7 @@ resources.jobs.*.job_clusters[*].new_cluster.workload_type.clients.notebooks boo | |
| resources.jobs.*.job_id int64 REMOTE | ||
| resources.jobs.*.lifecycle resources.Lifecycle INPUT | ||
| resources.jobs.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.jobs.*.lifecycle.started *bool INPUT | ||
| resources.jobs.*.max_concurrent_runs int ALL | ||
| resources.jobs.*.modified_status string INPUT | ||
| resources.jobs.*.name string ALL | ||
|
|
@@ -2094,6 +2106,7 @@ resources.model_serving_endpoints.*.endpoint_id string REMOTE | |
| resources.model_serving_endpoints.*.id string INPUT | ||
| resources.model_serving_endpoints.*.lifecycle resources.Lifecycle INPUT | ||
| resources.model_serving_endpoints.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.model_serving_endpoints.*.lifecycle.started *bool INPUT | ||
| resources.model_serving_endpoints.*.modified_status string INPUT | ||
| resources.model_serving_endpoints.*.name string INPUT STATE | ||
| resources.model_serving_endpoints.*.permissions []resources.ModelServingEndpointPermission INPUT | ||
|
|
@@ -2144,6 +2157,7 @@ resources.models.*.latest_versions[*].user_id string REMOTE | |
| resources.models.*.latest_versions[*].version string REMOTE | ||
| resources.models.*.lifecycle resources.Lifecycle INPUT | ||
| resources.models.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.models.*.lifecycle.started *bool INPUT | ||
| resources.models.*.modified_status string INPUT | ||
| resources.models.*.name string ALL | ||
| resources.models.*.permission_level ml.PermissionLevel REMOTE | ||
|
|
@@ -2462,6 +2476,7 @@ resources.pipelines.*.libraries[*].notebook.path string ALL | |
| resources.pipelines.*.libraries[*].whl string ALL | ||
| resources.pipelines.*.lifecycle resources.Lifecycle INPUT | ||
| resources.pipelines.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.pipelines.*.lifecycle.started *bool INPUT | ||
| resources.pipelines.*.modified_status string INPUT | ||
| resources.pipelines.*.name string ALL | ||
| resources.pipelines.*.notifications []pipelines.Notifications ALL | ||
|
|
@@ -2516,6 +2531,7 @@ resources.postgres_branches.*.id string INPUT | |
| resources.postgres_branches.*.is_protected bool INPUT STATE | ||
| resources.postgres_branches.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_branches.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_branches.*.lifecycle.started *bool INPUT | ||
| resources.postgres_branches.*.modified_status string INPUT | ||
| resources.postgres_branches.*.name string REMOTE | ||
| resources.postgres_branches.*.no_expiry bool INPUT STATE | ||
|
|
@@ -2559,6 +2575,7 @@ resources.postgres_endpoints.*.group.min int INPUT STATE | |
| resources.postgres_endpoints.*.id string INPUT | ||
| resources.postgres_endpoints.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_endpoints.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_endpoints.*.lifecycle.started *bool INPUT | ||
| resources.postgres_endpoints.*.modified_status string INPUT | ||
| resources.postgres_endpoints.*.name string REMOTE | ||
| resources.postgres_endpoints.*.no_suspension bool INPUT STATE | ||
|
|
@@ -2625,6 +2642,7 @@ resources.postgres_projects.*.initial_endpoint_spec.group.max int REMOTE | |
| resources.postgres_projects.*.initial_endpoint_spec.group.min int REMOTE | ||
| resources.postgres_projects.*.lifecycle resources.Lifecycle INPUT | ||
| resources.postgres_projects.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.postgres_projects.*.lifecycle.started *bool INPUT | ||
| resources.postgres_projects.*.modified_status string INPUT | ||
| resources.postgres_projects.*.name string REMOTE | ||
| resources.postgres_projects.*.permissions []resources.DatabaseProjectPermission INPUT | ||
|
|
@@ -2707,6 +2725,7 @@ resources.quality_monitors.*.inference_log.timestamp_col string ALL | |
| resources.quality_monitors.*.latest_monitor_failure_msg string ALL | ||
| resources.quality_monitors.*.lifecycle resources.Lifecycle INPUT | ||
| resources.quality_monitors.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.quality_monitors.*.lifecycle.started *bool INPUT | ||
| resources.quality_monitors.*.modified_status string INPUT | ||
| resources.quality_monitors.*.monitor_version int64 REMOTE | ||
| resources.quality_monitors.*.notifications *catalog.MonitorNotifications ALL | ||
|
|
@@ -2756,6 +2775,7 @@ resources.registered_models.*.grants[*].privileges[*] string INPUT | |
| resources.registered_models.*.id string INPUT | ||
| resources.registered_models.*.lifecycle resources.Lifecycle INPUT | ||
| resources.registered_models.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.registered_models.*.lifecycle.started *bool INPUT | ||
| resources.registered_models.*.metastore_id string ALL | ||
| resources.registered_models.*.modified_status string INPUT | ||
| resources.registered_models.*.name string ALL | ||
|
|
@@ -2792,6 +2812,7 @@ resources.schemas.*.grants[*].privileges[*] resources.SchemaGrantPrivilege INPUT | |
| resources.schemas.*.id string INPUT | ||
| resources.schemas.*.lifecycle resources.Lifecycle INPUT | ||
| resources.schemas.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.schemas.*.lifecycle.started *bool INPUT | ||
| resources.schemas.*.metastore_id string REMOTE | ||
| resources.schemas.*.modified_status string INPUT | ||
| resources.schemas.*.name string ALL | ||
|
|
@@ -2822,6 +2843,7 @@ resources.secret_scopes.*.keyvault_metadata.dns_name string INPUT REMOTE | |
| resources.secret_scopes.*.keyvault_metadata.resource_id string INPUT REMOTE | ||
| resources.secret_scopes.*.lifecycle resources.Lifecycle INPUT | ||
| resources.secret_scopes.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.secret_scopes.*.lifecycle.started *bool INPUT | ||
| resources.secret_scopes.*.modified_status string INPUT | ||
| resources.secret_scopes.*.name string INPUT REMOTE | ||
| resources.secret_scopes.*.permissions []resources.SecretScopePermission INPUT | ||
|
|
@@ -2861,6 +2883,7 @@ resources.sql_warehouses.*.instance_profile_arn string ALL | |
| resources.sql_warehouses.*.jdbc_url string REMOTE | ||
| resources.sql_warehouses.*.lifecycle resources.Lifecycle INPUT | ||
| resources.sql_warehouses.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.sql_warehouses.*.lifecycle.started *bool INPUT | ||
| resources.sql_warehouses.*.max_num_clusters int ALL | ||
| resources.sql_warehouses.*.min_num_clusters int ALL | ||
| resources.sql_warehouses.*.modified_status string INPUT | ||
|
|
@@ -2879,6 +2902,7 @@ resources.sql_warehouses.*.permissions[*].level resources.SqlWarehousePermission | |
| resources.sql_warehouses.*.permissions[*].service_principal_name string INPUT | ||
| resources.sql_warehouses.*.permissions[*].user_name string INPUT | ||
| resources.sql_warehouses.*.spot_instance_policy sql.SpotInstancePolicy ALL | ||
| resources.sql_warehouses.*.started bool STATE | ||
| resources.sql_warehouses.*.state sql.State REMOTE | ||
| resources.sql_warehouses.*.tags *sql.EndpointTags ALL | ||
| resources.sql_warehouses.*.tags.custom_tags []sql.EndpointTagPair ALL | ||
|
|
@@ -2942,6 +2966,7 @@ resources.synced_database_tables.*.effective_logical_database_name string ALL | |
| resources.synced_database_tables.*.id string INPUT | ||
| resources.synced_database_tables.*.lifecycle resources.Lifecycle INPUT | ||
| resources.synced_database_tables.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.synced_database_tables.*.lifecycle.started *bool INPUT | ||
| resources.synced_database_tables.*.logical_database_name string ALL | ||
| resources.synced_database_tables.*.modified_status string INPUT | ||
| resources.synced_database_tables.*.name string ALL | ||
|
|
@@ -2978,6 +3003,7 @@ resources.volumes.*.grants[*].privileges[*] resources.VolumeGrantPrivilege INPUT | |
| resources.volumes.*.id string INPUT | ||
| resources.volumes.*.lifecycle resources.Lifecycle INPUT | ||
| resources.volumes.*.lifecycle.prevent_destroy bool INPUT | ||
| resources.volumes.*.lifecycle.started *bool INPUT | ||
| resources.volumes.*.metastore_id string REMOTE | ||
| resources.volumes.*.modified_status string INPUT | ||
| resources.volumes.*.name string ALL | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| print("Hello world!") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| bundle: | ||
| name: lifecycle-started-$UNIQUE_NAME | ||
|
|
||
| resources: | ||
| apps: | ||
| myapp: | ||
| name: $UNIQUE_NAME | ||
| description: my_app_description | ||
| source_code_path: ./app | ||
| lifecycle: | ||
| started: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not run this test on terraform as well, to assert the error?