diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 4ae64141ab..4e0a18f572 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -2f10a6ab001e2fa2552f6b25f7fbb4a08014a43f \ No newline at end of file +4ad0f0856225e3ebc6bb11392d09d63a19e6d140 \ No newline at end of file diff --git a/.github/workflows/tagging.yml b/.github/workflows/tagging.yml index 33316d7e53..9bca7399f3 100644 --- a/.github/workflows/tagging.yml +++ b/.github/workflows/tagging.yml @@ -6,10 +6,10 @@ on: workflow_dispatch: # No inputs are required for the manual dispatch. - # Runs at 8:00 UTC on Tuesday, Wednesday, and Thursday. To enable automated + # Runs at 8:00 UTC on Monday, Tuesday, Wednesday, and Thursday. To enable automated # tagging for a repository, simply add it to the if block of the tag job. schedule: - - cron: '0 8 * * TUE,WED,THU' + - cron: '0 8 * * MON,TUE,WED,THU' # Ensure that only a single instance of the workflow is running at a time. concurrency: diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index df0561cb05..a98fbd1015 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -10,3 +10,5 @@ ### Dependency updates ### API Changes + +- Bump databricks-sdk-go from v0.112.0 to v0.117.0. diff --git a/acceptance/bundle/refschema/out.fields.txt b/acceptance/bundle/refschema/out.fields.txt index f401945572..4d0b8f0b59 100644 --- a/acceptance/bundle/refschema/out.fields.txt +++ b/acceptance/bundle/refschema/out.fields.txt @@ -188,6 +188,10 @@ resources.apps.*.resources[*].job *apps.AppResourceJob ALL resources.apps.*.resources[*].job.id string ALL resources.apps.*.resources[*].job.permission apps.AppResourceJobJobPermission ALL resources.apps.*.resources[*].name string ALL +resources.apps.*.resources[*].postgres *apps.AppResourcePostgres ALL +resources.apps.*.resources[*].postgres.branch string ALL +resources.apps.*.resources[*].postgres.database string ALL +resources.apps.*.resources[*].postgres.permission apps.AppResourcePostgresPostgresPermission ALL resources.apps.*.resources[*].secret *apps.AppResourceSecret ALL resources.apps.*.resources[*].secret.key string ALL resources.apps.*.resources[*].secret.permission apps.AppResourceSecretSecretPermission ALL @@ -2267,9 +2271,11 @@ resources.pipelines.*.development bool ALL resources.pipelines.*.dry_run bool ALL resources.pipelines.*.edition string ALL resources.pipelines.*.effective_budget_policy_id string REMOTE +resources.pipelines.*.effective_publishing_mode pipelines.PublishingMode REMOTE resources.pipelines.*.environment *pipelines.PipelinesEnvironment ALL resources.pipelines.*.environment.dependencies []string ALL resources.pipelines.*.environment.dependencies[*] string ALL +resources.pipelines.*.environment.environment_version string ALL resources.pipelines.*.event_log *pipelines.EventLogSpec ALL resources.pipelines.*.event_log.catalog string ALL resources.pipelines.*.event_log.name string ALL @@ -2616,6 +2622,7 @@ resources.postgres_projects.*.default_endpoint_settings.pg_settings map[string]s resources.postgres_projects.*.default_endpoint_settings.pg_settings.* string INPUT STATE resources.postgres_projects.*.default_endpoint_settings.suspend_timeout_duration *duration.Duration INPUT STATE resources.postgres_projects.*.display_name string INPUT STATE +resources.postgres_projects.*.enable_pg_native_login bool INPUT STATE resources.postgres_projects.*.history_retention_duration *duration.Duration INPUT STATE resources.postgres_projects.*.id string INPUT resources.postgres_projects.*.initial_endpoint_spec *postgres.InitialEndpointSpec REMOTE @@ -2649,6 +2656,7 @@ resources.postgres_projects.*.spec.default_endpoint_settings.pg_settings map[str resources.postgres_projects.*.spec.default_endpoint_settings.pg_settings.* string REMOTE resources.postgres_projects.*.spec.default_endpoint_settings.suspend_timeout_duration *duration.Duration REMOTE resources.postgres_projects.*.spec.display_name string REMOTE +resources.postgres_projects.*.spec.enable_pg_native_login bool REMOTE resources.postgres_projects.*.spec.history_retention_duration *duration.Duration REMOTE resources.postgres_projects.*.spec.pg_version int REMOTE resources.postgres_projects.*.status *postgres.ProjectStatus REMOTE @@ -2666,6 +2674,7 @@ resources.postgres_projects.*.status.default_endpoint_settings.pg_settings map[s resources.postgres_projects.*.status.default_endpoint_settings.pg_settings.* string REMOTE resources.postgres_projects.*.status.default_endpoint_settings.suspend_timeout_duration *duration.Duration REMOTE resources.postgres_projects.*.status.display_name string REMOTE +resources.postgres_projects.*.status.enable_pg_native_login bool REMOTE resources.postgres_projects.*.status.history_retention_duration *duration.Duration REMOTE resources.postgres_projects.*.status.owner string REMOTE resources.postgres_projects.*.status.pg_version int REMOTE diff --git a/bundle/direct/dresources/pipeline.go b/bundle/direct/dresources/pipeline.go index 73669da133..30d2ab5313 100644 --- a/bundle/direct/dresources/pipeline.go +++ b/bundle/direct/dresources/pipeline.go @@ -20,6 +20,7 @@ type PipelineRemote struct { ClusterId string `json:"cluster_id,omitempty"` CreatorUserName string `json:"creator_user_name,omitempty"` EffectiveBudgetPolicyId string `json:"effective_budget_policy_id,omitempty"` + EffectivePublishingMode pipelines.PublishingMode `json:"effective_publishing_mode,omitempty"` Health pipelines.GetPipelineResponseHealth `json:"health,omitempty"` LastModified int64 `json:"last_modified,omitempty"` LatestUpdates []pipelines.UpdateStateInfo `json:"latest_updates,omitempty"` @@ -111,6 +112,7 @@ func makePipelineRemote(p *pipelines.GetPipelineResponse) *PipelineRemote { ClusterId: p.ClusterId, CreatorUserName: p.CreatorUserName, EffectiveBudgetPolicyId: p.EffectiveBudgetPolicyId, + EffectivePublishingMode: p.EffectivePublishingMode, Health: p.Health, LastModified: p.LastModified, LatestUpdates: p.LatestUpdates, diff --git a/bundle/direct/dresources/postgres_project.go b/bundle/direct/dresources/postgres_project.go index 50d0028436..85c20b9cbe 100644 --- a/bundle/direct/dresources/postgres_project.go +++ b/bundle/direct/dresources/postgres_project.go @@ -42,6 +42,7 @@ func (*ResourcePostgresProject) RemapState(remote *postgres.Project) *PostgresPr CustomTags: nil, DefaultEndpointSettings: nil, DisplayName: "", + EnablePgNativeLogin: false, HistoryRetentionDuration: nil, PgVersion: 0, ForceSendFields: nil, diff --git a/bundle/direct/dresources/type_test.go b/bundle/direct/dresources/type_test.go index ade20e0ccd..d061d4d0da 100644 --- a/bundle/direct/dresources/type_test.go +++ b/bundle/direct/dresources/type_test.go @@ -69,6 +69,7 @@ var knownMissingInRemoteType = map[string][]string{ "custom_tags", "default_endpoint_settings", "display_name", + "enable_pg_native_login", "history_retention_duration", "pg_version", "project_id", diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 8b4817bd4f..44dddfbd5d 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -961,6 +961,9 @@ github.com/databricks/cli/bundle/config/resources.PostgresProject: "display_name": "description": |- PLACEHOLDER + "enable_pg_native_login": + "description": |- + PLACEHOLDER "history_retention_duration": "description": |- PLACEHOLDER diff --git a/bundle/internal/schema/annotations_openapi.yml b/bundle/internal/schema/annotations_openapi.yml index d033809ef5..13cd08eacf 100644 --- a/bundle/internal/schema/annotations_openapi.yml +++ b/bundle/internal/schema/annotations_openapi.yml @@ -1222,9 +1222,7 @@ github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentStatus: "x-databricks-field-behaviors_output_only": |- true github.com/databricks/databricks-sdk-go/service/apps.AppResource: - "app": - "x-databricks-preview": |- - PRIVATE + "app": {} "database": {} "description": "description": |- @@ -1235,6 +1233,9 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResource: "name": "description": |- Name of the App Resource. + "postgres": + "x-databricks-preview": |- + PRIVATE "secret": {} "serving_endpoint": {} "sql_warehouse": {} @@ -1294,6 +1295,21 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResourceJobJobPermission CAN_MANAGE_RUN - |- CAN_VIEW +github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres: + "branch": + "x-databricks-preview": |- + PRIVATE + "database": + "x-databricks-preview": |- + PRIVATE + "permission": + "x-databricks-preview": |- + PRIVATE +github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgresPostgresPermission: + "_": + "enum": + - |- + CAN_CONNECT_AND_CREATE github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret: "key": "description": |- @@ -1356,8 +1372,6 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurable: See https://docs.databricks.com/api/workspace/tables/get#securable_kind_manifest-securable_kind. "x-databricks-field-behaviors_output_only": |- true - "x-databricks-preview": |- - PRIVATE "securable_type": {} github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurableUcSecurablePermission: "_": @@ -4491,6 +4505,20 @@ github.com/databricks/databricks-sdk-go/service/pipelines.PipelinesEnvironment: List of pip dependencies, as supported by the version of pip in this environment. Each dependency is a pip requirement file line https://pip.pypa.io/en/stable/reference/requirements-file-format/ Allowed dependency could be , , (WSFS or Volumes in Databricks), + "environment_version": + "description": |- + The environment version of the serverless Python environment used to execute + customer Python code. Each environment version includes a specific Python + version and a curated set of pre-installed libraries with defined versions, + providing a stable and reproducible execution environment. + + Databricks supports a three-year lifecycle for each environment version. + For available versions and their included packages, see + https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/ + + The value should be a string representing the environment version number, for example: `"4"`. + "x-databricks-preview": |- + PRIVATE github.com/databricks/databricks-sdk-go/service/pipelines.PostgresCatalogConfig: "_": "description": |- diff --git a/bundle/internal/schema/annotations_openapi_overrides.yml b/bundle/internal/schema/annotations_openapi_overrides.yml index c9eeaa13e1..34acadf02e 100644 --- a/bundle/internal/schema/annotations_openapi_overrides.yml +++ b/bundle/internal/schema/annotations_openapi_overrides.yml @@ -796,6 +796,9 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResource: "job": "description": |- PLACEHOLDER + "postgres": + "description": |- + PLACEHOLDER "secret": "description": |- PLACEHOLDER @@ -842,6 +845,16 @@ github.com/databricks/databricks-sdk-go/service/apps.AppResourceJob: "permission": "description": |- PLACEHOLDER +github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres: + "branch": + "description": |- + PLACEHOLDER + "database": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret: "key": "description": |- diff --git a/bundle/internal/validation/generated/enum_fields.go b/bundle/internal/validation/generated/enum_fields.go index c1ea107de4..4f03918a53 100644 --- a/bundle/internal/validation/generated/enum_fields.go +++ b/bundle/internal/validation/generated/enum_fields.go @@ -27,6 +27,7 @@ var EnumFields = map[string][]string{ "resources.apps.*.resources[*].experiment.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_READ"}, "resources.apps.*.resources[*].genie_space.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_RUN", "CAN_VIEW"}, "resources.apps.*.resources[*].job.permission": {"CAN_MANAGE", "CAN_MANAGE_RUN", "CAN_VIEW", "IS_OWNER"}, + "resources.apps.*.resources[*].postgres.permission": {"CAN_CONNECT_AND_CREATE"}, "resources.apps.*.resources[*].secret.permission": {"MANAGE", "READ", "WRITE"}, "resources.apps.*.resources[*].serving_endpoint.permission": {"CAN_MANAGE", "CAN_QUERY", "CAN_VIEW"}, "resources.apps.*.resources[*].sql_warehouse.permission": {"CAN_MANAGE", "CAN_USE", "IS_OWNER"}, diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index 2f48fb85f9..3942119011 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -1867,6 +1867,9 @@ "display_name": { "$ref": "#/$defs/string" }, + "enable_pg_native_login": { + "$ref": "#/$defs/bool" + }, "history_retention_duration": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/common/types/duration.Duration" }, @@ -3359,9 +3362,7 @@ "type": "object", "properties": { "app": { - "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceApp", - "x-databricks-preview": "PRIVATE", - "doNotSuggest": true + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceApp" }, "database": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase" @@ -3383,6 +3384,11 @@ "description": "Name of the App Resource.", "$ref": "#/$defs/string" }, + "postgres": { + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, "secret": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret" }, @@ -3587,6 +3593,49 @@ } ] }, + "apps.AppResourcePostgres": { + "oneOf": [ + { + "type": "object", + "properties": { + "branch": { + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, + "database": { + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, + "permission": { + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgresPostgresPermission", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + } + }, + "additionalProperties": false + }, + { + "type": "string", + "pattern": "\\$\\{(var(\\.[a-zA-Z]+([-_]?[a-zA-Z0-9]+)*(\\[[0-9]+\\])*)+)\\}" + } + ] + }, + "apps.AppResourcePostgresPostgresPermission": { + "oneOf": [ + { + "type": "string", + "enum": [ + "CAN_CONNECT_AND_CREATE" + ] + }, + { + "type": "string", + "pattern": "\\$\\{(var(\\.[a-zA-Z]+([-_]?[a-zA-Z0-9]+)*(\\[[0-9]+\\])*)+)\\}" + } + ] + }, "apps.AppResourceSecret": { "oneOf": [ { @@ -8605,6 +8654,12 @@ "dependencies": { "description": "List of pip dependencies, as supported by the version of pip in this environment.\nEach dependency is a pip requirement file line https://pip.pypa.io/en/stable/reference/requirements-file-format/\nAllowed dependency could be \u003crequirement specifier\u003e, \u003carchive url/path\u003e, \u003clocal project path\u003e(WSFS or Volumes in Databricks), \u003cvcs project url\u003e", "$ref": "#/$defs/slice/string" + }, + "environment_version": { + "description": "The environment version of the serverless Python environment used to execute\ncustomer Python code. Each environment version includes a specific Python\nversion and a curated set of pre-installed libraries with defined versions,\nproviding a stable and reproducible execution environment.\n\nDatabricks supports a three-year lifecycle for each environment version.\nFor available versions and their included packages, see\nhttps://docs.databricks.com/aws/en/release-notes/serverless/environment-version/\n\nThe value should be a string representing the environment version number, for example: `\"4\"`.", + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true } }, "additionalProperties": false diff --git a/bundle/schema/jsonschema_for_docs.json b/bundle/schema/jsonschema_for_docs.json index 406bbe2aca..f44a213446 100644 --- a/bundle/schema/jsonschema_for_docs.json +++ b/bundle/schema/jsonschema_for_docs.json @@ -139,6 +139,11 @@ "doNotSuggest": true, "x-since-version": "v0.283.0" }, + "git_source": { + "description": "Git source configuration for app deployments. Specifies which git reference (branch, tag, or commit)\nto use when deploying the app. Used in conjunction with git_repository to deploy code directly from git.\nThe source_code_path within git_source specifies the relative path to the app code within the repository.", + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.GitSource", + "x-since-version": "v0.290.0" + }, "lifecycle": { "description": "Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed.", "$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle", @@ -166,7 +171,8 @@ "description": "Name of the space this app belongs to.", "$ref": "#/$defs/string", "x-databricks-preview": "PRIVATE", - "doNotSuggest": true + "doNotSuggest": true, + "x-since-version": "v0.290.0" }, "usage_policy_id": { "$ref": "#/$defs/string", @@ -1641,7 +1647,8 @@ "x-since-version": "v0.287.0" }, "group": { - "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/postgres.EndpointGroupSpec" + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/postgres.EndpointGroupSpec", + "x-since-version": "v0.290.0" }, "lifecycle": { "$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle", @@ -1675,10 +1682,12 @@ "type": "object", "properties": { "budget_policy_id": { - "$ref": "#/$defs/string" + "$ref": "#/$defs/string", + "x-since-version": "v0.290.0" }, "custom_tags": { - "$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/postgres.ProjectCustomTag" + "$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/postgres.ProjectCustomTag", + "x-since-version": "v0.290.0" }, "default_endpoint_settings": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/postgres.ProjectDefaultEndpointSettings", @@ -1688,6 +1697,9 @@ "$ref": "#/$defs/string", "x-since-version": "v0.287.0" }, + "enable_pg_native_login": { + "$ref": "#/$defs/bool" + }, "history_retention_duration": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/common/types/duration.Duration", "x-since-version": "v0.287.0" @@ -3081,8 +3093,7 @@ "properties": { "app": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceApp", - "x-databricks-preview": "PRIVATE", - "doNotSuggest": true + "x-since-version": "v0.290.0" }, "database": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase", @@ -3110,6 +3121,11 @@ "$ref": "#/$defs/string", "x-since-version": "v0.239.0" }, + "postgres": { + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, "secret": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret", "x-since-version": "v0.239.0" @@ -3250,6 +3266,33 @@ "CAN_VIEW" ] }, + "apps.AppResourcePostgres": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, + "database": { + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + }, + "permission": { + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgresPostgresPermission", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true + } + }, + "additionalProperties": false + }, + "apps.AppResourcePostgresPostgresPermission": { + "type": "string", + "enum": [ + "CAN_CONNECT_AND_CREATE" + ] + }, "apps.AppResourceSecret": { "type": "object", "properties": { @@ -5290,7 +5333,8 @@ "sparse_checkout": { "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/jobs.SparseCheckout", "x-databricks-preview": "PRIVATE", - "doNotSuggest": true + "doNotSuggest": true, + "x-since-version": "v0.290.0" } }, "additionalProperties": false, @@ -6009,7 +6053,8 @@ "properties": { "patterns": { "description": "List of patterns to include for sparse checkout.", - "$ref": "#/$defs/slice/string" + "$ref": "#/$defs/slice/string", + "x-since-version": "v0.290.0" } }, "additionalProperties": false @@ -7228,6 +7273,12 @@ "description": "List of pip dependencies, as supported by the version of pip in this environment.\nEach dependency is a pip requirement file line https://pip.pypa.io/en/stable/reference/requirements-file-format/\nAllowed dependency could be \u003crequirement specifier\u003e, \u003carchive url/path\u003e, \u003clocal project path\u003e(WSFS or Volumes in Databricks), \u003cvcs project url\u003e", "$ref": "#/$defs/slice/string", "x-since-version": "v0.257.0" + }, + "environment_version": { + "description": "The environment version of the serverless Python environment used to execute\ncustomer Python code. Each environment version includes a specific Python\nversion and a curated set of pre-installed libraries with defined versions,\nproviding a stable and reproducible execution environment.\n\nDatabricks supports a three-year lifecycle for each environment version.\nFor available versions and their included packages, see\nhttps://docs.databricks.com/aws/en/release-notes/serverless/environment-version/\n\nThe value should be a string representing the environment version number, for example: `\"4\"`.", + "$ref": "#/$defs/string", + "x-databricks-preview": "PRIVATE", + "doNotSuggest": true } }, "additionalProperties": false @@ -7527,15 +7578,18 @@ "properties": { "enable_readable_secondaries": { "description": "Whether to allow read-only connections to read-write endpoints. Only relevant for read-write endpoints where\nsize.max \u003e 1.", - "$ref": "#/$defs/bool" + "$ref": "#/$defs/bool", + "x-since-version": "v0.290.0" }, "max": { "description": "The maximum number of computes in the endpoint group. Currently, this must be equal to min. Set to 1 for single\ncompute endpoints, to disable HA. To manually suspend all computes in an endpoint group, set disabled to\ntrue on the EndpointSpec.", - "$ref": "#/$defs/int" + "$ref": "#/$defs/int", + "x-since-version": "v0.290.0" }, "min": { "description": "The minimum number of computes in the endpoint group. Currently, this must be equal to max. This must be greater\nthan or equal to 1.", - "$ref": "#/$defs/int" + "$ref": "#/$defs/int", + "x-since-version": "v0.290.0" } }, "additionalProperties": false, @@ -7569,11 +7623,13 @@ "properties": { "key": { "description": "The key of the custom tag.", - "$ref": "#/$defs/string" + "$ref": "#/$defs/string", + "x-since-version": "v0.290.0" }, "value": { "description": "The value of the custom tag.", - "$ref": "#/$defs/string" + "$ref": "#/$defs/string", + "x-since-version": "v0.290.0" } }, "additionalProperties": false diff --git a/cmd/account/endpoints/endpoints.go b/cmd/account/endpoints/endpoints.go index 5ef2e140a2..9e1d3e7bac 100755 --- a/cmd/account/endpoints/endpoints.go +++ b/cmd/account/endpoints/endpoints.go @@ -74,7 +74,8 @@ func newCreateEndpoint() *cobra.Command { An endpoint can be used only after it reaches the APPROVED state. Arguments: - PARENT: + PARENT: The parent resource name of the account under which the endpoint is + created. Format: accounts/{account_id}. DISPLAY_NAME: The human-readable display name of this endpoint. The input should conform to RFC-1034, which restricts to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and a 63 @@ -268,7 +269,11 @@ func newListEndpoints() *cobra.Command { cmd.Short = `List network endpoints.` cmd.Long = `List network endpoints. - Lists all network connectivity endpoints for the account.` + Lists all network connectivity endpoints for the account. + + Arguments: + PARENT: The parent resource name of the account to list endpoints for. Format: + accounts/{account_id}.` cmd.Annotations = make(map[string]string) diff --git a/cmd/auth/token_test.go b/cmd/auth/token_test.go index e070e9bd15..3ec69e0e33 100644 --- a/cmd/auth/token_test.go +++ b/cmd/auth/token_test.go @@ -76,6 +76,11 @@ func (m *MockApiClient) GetUnifiedOAuthEndpoints(ctx context.Context, host, acco }, nil } +// GetEndpointsFromURL implements u2m.OAuthEndpointSupplier. +func (m *MockApiClient) GetEndpointsFromURL(_ context.Context, _ string) (*u2m.OAuthAuthorizationServer, error) { + return nil, u2m.ErrOAuthNotSupported +} + var _ u2m.OAuthEndpointSupplier = (*MockApiClient)(nil) func TestToken_loadToken(t *testing.T) { diff --git a/cmd/workspace/instance-pools/instance-pools.go b/cmd/workspace/instance-pools/instance-pools.go index 6ca5f9db4a..3b6b673b3a 100755 --- a/cmd/workspace/instance-pools/instance-pools.go +++ b/cmd/workspace/instance-pools/instance-pools.go @@ -283,7 +283,6 @@ func newEdit() *cobra.Command { cmd.Flags().IntVar(&editReq.IdleInstanceAutoterminationMinutes, "idle-instance-autotermination-minutes", editReq.IdleInstanceAutoterminationMinutes, `Automatically terminates the extra instances in the pool cache after they are inactive for this time in minutes if min_idle_instances requirement is already met.`) cmd.Flags().IntVar(&editReq.MaxCapacity, "max-capacity", editReq.MaxCapacity, `Maximum number of outstanding instances to keep in the pool, including both instances used by clusters and idle instances.`) cmd.Flags().IntVar(&editReq.MinIdleInstances, "min-idle-instances", editReq.MinIdleInstances, `Minimum number of idle instances to keep in the instance pool.`) - // TODO: complex arg: node_type_flexibility cmd.Flags().IntVar(&editReq.RemoteDiskThroughput, "remote-disk-throughput", editReq.RemoteDiskThroughput, `If set, what the configurable throughput (in Mb/s) for the remote disk is.`) cmd.Flags().IntVar(&editReq.TotalInitialRemoteDiskSize, "total-initial-remote-disk-size", editReq.TotalInitialRemoteDiskSize, `If set, what the total initial volume size (in GB) of the remote disks should be.`) diff --git a/cmd/workspace/pipelines/pipelines.go b/cmd/workspace/pipelines/pipelines.go index 168405c118..023d08bb05 100755 --- a/cmd/workspace/pipelines/pipelines.go +++ b/cmd/workspace/pipelines/pipelines.go @@ -846,6 +846,7 @@ func newStartUpdate() *cobra.Command { // TODO: map via StringToStringVar: parameters // TODO: array: refresh_selection // TODO: array: replace_where_overrides + // TODO: array: reset_checkpoint_selection // TODO: complex arg: rewind_spec cmd.Flags().BoolVar(&startUpdateReq.ValidateOnly, "validate-only", startUpdateReq.ValidateOnly, `If true, this update only validates the correctness of pipeline source code but does not materialize or publish any datasets.`) diff --git a/cmd/workspace/postgres/postgres.go b/cmd/workspace/postgres/postgres.go index 336b8a7c4d..2ab401d3f2 100755 --- a/cmd/workspace/postgres/postgres.go +++ b/cmd/workspace/postgres/postgres.go @@ -43,24 +43,29 @@ func New() *cobra.Command { // Add methods cmd.AddCommand(newCreateBranch()) + cmd.AddCommand(newCreateDatabase()) cmd.AddCommand(newCreateEndpoint()) cmd.AddCommand(newCreateProject()) cmd.AddCommand(newCreateRole()) cmd.AddCommand(newDeleteBranch()) + cmd.AddCommand(newDeleteDatabase()) cmd.AddCommand(newDeleteEndpoint()) cmd.AddCommand(newDeleteProject()) cmd.AddCommand(newDeleteRole()) cmd.AddCommand(newGenerateDatabaseCredential()) cmd.AddCommand(newGetBranch()) + cmd.AddCommand(newGetDatabase()) cmd.AddCommand(newGetEndpoint()) cmd.AddCommand(newGetOperation()) cmd.AddCommand(newGetProject()) cmd.AddCommand(newGetRole()) cmd.AddCommand(newListBranches()) + cmd.AddCommand(newListDatabases()) cmd.AddCommand(newListEndpoints()) cmd.AddCommand(newListProjects()) cmd.AddCommand(newListRoles()) cmd.AddCommand(newUpdateBranch()) + cmd.AddCommand(newUpdateDatabase()) cmd.AddCommand(newUpdateEndpoint()) cmd.AddCommand(newUpdateProject()) @@ -197,6 +202,132 @@ func newCreateBranch() *cobra.Command { return cmd } +// start create-database command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var createDatabaseOverrides []func( + *cobra.Command, + *postgres.CreateDatabaseRequest, +) + +func newCreateDatabase() *cobra.Command { + cmd := &cobra.Command{} + + var createDatabaseReq postgres.CreateDatabaseRequest + createDatabaseReq.Database = postgres.Database{} + var createDatabaseJson flags.JsonFlag + + var createDatabaseSkipWait bool + var createDatabaseTimeout time.Duration + + cmd.Flags().BoolVar(&createDatabaseSkipWait, "no-wait", createDatabaseSkipWait, `do not wait to reach DONE state`) + cmd.Flags().DurationVar(&createDatabaseTimeout, "timeout", 0, `maximum amount of time to reach DONE state`) + + cmd.Flags().Var(&createDatabaseJson, "json", `either inline JSON string or @path/to/file.json with request body`) + + cmd.Flags().StringVar(&createDatabaseReq.DatabaseId, "database-id", createDatabaseReq.DatabaseId, `The ID to use for the Database, which will become the final component of the database's resource name.`) + cmd.Flags().StringVar(&createDatabaseReq.Database.Name, "name", createDatabaseReq.Database.Name, `The resource name of the database.`) + // TODO: complex arg: spec + // TODO: complex arg: status + + cmd.Use = "create-database PARENT" + cmd.Short = `Create a Database.` + cmd.Long = `Create a Database. + + Create a Database. + + Creates a database in the specified branch. A branch can have multiple + databases. + + This is a long-running operation. By default, the command waits for the + operation to complete. Use --no-wait to return immediately with the raw + operation details. The operation's 'name' field can then be used to poll for + completion using the get-operation command. + + Arguments: + PARENT: The Branch where this Database will be created. Format: + projects/{project_id}/branches/{branch_id}` + + // This command is being previewed; hide from help output. + cmd.Hidden = true + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + if cmd.Flags().Changed("json") { + diags := createDatabaseJson.Unmarshal(&createDatabaseReq.Database) + if diags.HasError() { + return diags.Error() + } + if len(diags) > 0 { + err := cmdio.RenderDiagnostics(ctx, diags) + if err != nil { + return err + } + } + } + createDatabaseReq.Parent = args[0] + + // Determine which mode to execute based on flags. + switch { + case createDatabaseSkipWait: + wait, err := w.Postgres.CreateDatabase(ctx, createDatabaseReq) + if err != nil { + return err + } + + // Return operation immediately without waiting. + operation, err := w.Postgres.GetOperation(ctx, postgres.GetOperationRequest{ + Name: wait.Name(), + }) + if err != nil { + return err + } + return cmdio.Render(ctx, operation) + + default: + wait, err := w.Postgres.CreateDatabase(ctx, createDatabaseReq) + if err != nil { + return err + } + + // Show spinner while waiting for completion. + spinner := cmdio.Spinner(ctx) + spinner <- "Waiting for create-database to complete..." + + // Wait for completion. + opts := api.WithTimeout(createDatabaseTimeout) + response, err := wait.Wait(ctx, opts) + if err != nil { + return err + } + close(spinner) + return cmdio.Render(ctx, response) + } + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range createDatabaseOverrides { + fn(cmd, &createDatabaseReq) + } + + return cmd +} + // start create-endpoint command // Slice with functions to override default command behavior. @@ -668,6 +799,107 @@ func newDeleteBranch() *cobra.Command { return cmd } +// start delete-database command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var deleteDatabaseOverrides []func( + *cobra.Command, + *postgres.DeleteDatabaseRequest, +) + +func newDeleteDatabase() *cobra.Command { + cmd := &cobra.Command{} + + var deleteDatabaseReq postgres.DeleteDatabaseRequest + + var deleteDatabaseSkipWait bool + var deleteDatabaseTimeout time.Duration + + cmd.Flags().BoolVar(&deleteDatabaseSkipWait, "no-wait", deleteDatabaseSkipWait, `do not wait to reach DONE state`) + cmd.Flags().DurationVar(&deleteDatabaseTimeout, "timeout", 0, `maximum amount of time to reach DONE state`) + + cmd.Use = "delete-database NAME" + cmd.Short = `Delete a Database.` + cmd.Long = `Delete a Database. + + This is a long-running operation. By default, the command waits for the + operation to complete. Use --no-wait to return immediately with the raw + operation details. The operation's 'name' field can then be used to poll for + completion using the get-operation command. + + Arguments: + NAME: The resource name of the postgres database. Format: + projects/{project_id}/branches/{branch_id}/databases/{database_id}` + + // This command is being previewed; hide from help output. + cmd.Hidden = true + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + deleteDatabaseReq.Name = args[0] + + // Determine which mode to execute based on flags. + switch { + case deleteDatabaseSkipWait: + wait, err := w.Postgres.DeleteDatabase(ctx, deleteDatabaseReq) + if err != nil { + return err + } + + // Return operation immediately without waiting. + operation, err := w.Postgres.GetOperation(ctx, postgres.GetOperationRequest{ + Name: wait.Name(), + }) + if err != nil { + return err + } + return cmdio.Render(ctx, operation) + + default: + wait, err := w.Postgres.DeleteDatabase(ctx, deleteDatabaseReq) + if err != nil { + return err + } + + // Show spinner while waiting for completion. + spinner := cmdio.Spinner(ctx) + spinner <- "Waiting for delete-database to complete..." + + // Wait for completion. + opts := api.WithTimeout(deleteDatabaseTimeout) + + err = wait.Wait(ctx, opts) + if err != nil { + return err + } + close(spinner) + return nil + } + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range deleteDatabaseOverrides { + fn(cmd, &deleteDatabaseReq) + } + + return cmd +} + // start delete-endpoint command // Slice with functions to override default command behavior. @@ -1112,6 +1344,64 @@ func newGetBranch() *cobra.Command { return cmd } +// start get-database command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var getDatabaseOverrides []func( + *cobra.Command, + *postgres.GetDatabaseRequest, +) + +func newGetDatabase() *cobra.Command { + cmd := &cobra.Command{} + + var getDatabaseReq postgres.GetDatabaseRequest + + cmd.Use = "get-database NAME" + cmd.Short = `Get a Database.` + cmd.Long = `Get a Database. + + Arguments: + NAME: The name of the Database to retrieve. Format: + projects/{project_id}/branches/{branch_id}/databases/{database_id}` + + // This command is being previewed; hide from help output. + cmd.Hidden = true + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + getDatabaseReq.Name = args[0] + + response, err := w.Postgres.GetDatabase(ctx, getDatabaseReq) + if err != nil { + return err + } + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range getDatabaseOverrides { + fn(cmd, &getDatabaseReq) + } + + return cmd +} + // start get-endpoint command // Slice with functions to override default command behavior. @@ -1401,6 +1691,66 @@ func newListBranches() *cobra.Command { return cmd } +// start list-databases command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var listDatabasesOverrides []func( + *cobra.Command, + *postgres.ListDatabasesRequest, +) + +func newListDatabases() *cobra.Command { + cmd := &cobra.Command{} + + var listDatabasesReq postgres.ListDatabasesRequest + + cmd.Flags().IntVar(&listDatabasesReq.PageSize, "page-size", listDatabasesReq.PageSize, `Upper bound for items returned.`) + cmd.Flags().StringVar(&listDatabasesReq.PageToken, "page-token", listDatabasesReq.PageToken, `Pagination token to go to the next page of Databases.`) + + cmd.Use = "list-databases PARENT" + cmd.Short = `List postgres databases in a branch.` + cmd.Long = `List postgres databases in a branch. + + List Databases. + + Arguments: + PARENT: The Branch that owns this collection of databases. Format: + projects/{project_id}/branches/{branch_id}` + + // This command is being previewed; hide from help output. + cmd.Hidden = true + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + listDatabasesReq.Parent = args[0] + + response := w.Postgres.ListDatabases(ctx, listDatabasesReq) + return cmdio.RenderIterator(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range listDatabasesOverrides { + fn(cmd, &listDatabasesReq) + } + + return cmd +} + // start list-endpoints command // Slice with functions to override default command behavior. @@ -1696,6 +2046,132 @@ func newUpdateBranch() *cobra.Command { return cmd } +// start update-database command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var updateDatabaseOverrides []func( + *cobra.Command, + *postgres.UpdateDatabaseRequest, +) + +func newUpdateDatabase() *cobra.Command { + cmd := &cobra.Command{} + + var updateDatabaseReq postgres.UpdateDatabaseRequest + updateDatabaseReq.Database = postgres.Database{} + var updateDatabaseJson flags.JsonFlag + + var updateDatabaseSkipWait bool + var updateDatabaseTimeout time.Duration + + cmd.Flags().BoolVar(&updateDatabaseSkipWait, "no-wait", updateDatabaseSkipWait, `do not wait to reach DONE state`) + cmd.Flags().DurationVar(&updateDatabaseTimeout, "timeout", 0, `maximum amount of time to reach DONE state`) + + cmd.Flags().Var(&updateDatabaseJson, "json", `either inline JSON string or @path/to/file.json with request body`) + + cmd.Flags().StringVar(&updateDatabaseReq.Database.Name, "name", updateDatabaseReq.Database.Name, `The resource name of the database.`) + // TODO: complex arg: spec + // TODO: complex arg: status + + cmd.Use = "update-database NAME UPDATE_MASK" + cmd.Short = `Update a Database.` + cmd.Long = `Update a Database. + + This is a long-running operation. By default, the command waits for the + operation to complete. Use --no-wait to return immediately with the raw + operation details. The operation's 'name' field can then be used to poll for + completion using the get-operation command. + + Arguments: + NAME: The resource name of the database. Format: + projects/{project_id}/branches/{branch_id}/databases/{database_id} + UPDATE_MASK: The list of fields to update. If unspecified, all fields will be updated + when possible.` + + // This command is being previewed; hide from help output. + cmd.Hidden = true + + cmd.Annotations = make(map[string]string) + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(2) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + if cmd.Flags().Changed("json") { + diags := updateDatabaseJson.Unmarshal(&updateDatabaseReq.Database) + if diags.HasError() { + return diags.Error() + } + if len(diags) > 0 { + err := cmdio.RenderDiagnostics(ctx, diags) + if err != nil { + return err + } + } + } + updateDatabaseReq.Name = args[0] + if args[1] != "" { + updateMaskArray := strings.Split(args[1], ",") + updateDatabaseReq.UpdateMask = *fieldmask.New(updateMaskArray) + } + + // Determine which mode to execute based on flags. + switch { + case updateDatabaseSkipWait: + wait, err := w.Postgres.UpdateDatabase(ctx, updateDatabaseReq) + if err != nil { + return err + } + + // Return operation immediately without waiting. + operation, err := w.Postgres.GetOperation(ctx, postgres.GetOperationRequest{ + Name: wait.Name(), + }) + if err != nil { + return err + } + return cmdio.Render(ctx, operation) + + default: + wait, err := w.Postgres.UpdateDatabase(ctx, updateDatabaseReq) + if err != nil { + return err + } + + // Show spinner while waiting for completion. + spinner := cmdio.Spinner(ctx) + spinner <- "Waiting for update-database to complete..." + + // Wait for completion. + opts := api.WithTimeout(updateDatabaseTimeout) + response, err := wait.Wait(ctx, opts) + if err != nil { + return err + } + close(spinner) + return cmdio.Render(ctx, response) + } + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range updateDatabaseOverrides { + fn(cmd, &updateDatabaseReq) + } + + return cmd +} + // start update-endpoint command // Slice with functions to override default command behavior. diff --git a/go.mod b/go.mod index 63ec8ad52a..a9974d171b 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/charmbracelet/bubbletea v1.3.10 // MIT github.com/charmbracelet/huh v0.8.0 github.com/charmbracelet/lipgloss v1.1.0 // MIT - github.com/databricks/databricks-sdk-go v0.112.0 // Apache 2.0 + github.com/databricks/databricks-sdk-go v0.117.0 // Apache 2.0 github.com/fatih/color v1.18.0 // MIT github.com/google/uuid v1.6.0 // BSD-3-Clause github.com/gorilla/mux v1.8.1 // BSD 3-Clause diff --git a/go.sum b/go.sum index 54b1456bb9..ba14f0d798 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= -github.com/databricks/databricks-sdk-go v0.112.0 h1:2VhzqTZskKDS+r9h024cf2H2ywVG1HIznY2RtOy/UsE= -github.com/databricks/databricks-sdk-go v0.112.0/go.mod h1:hWoHnHbNLjPKiTm5K/7bcIv3J3Pkgo5x9pPzh8K3RVE= +github.com/databricks/databricks-sdk-go v0.117.0 h1:CJNFcQIkHgPMVJTSeiQoHftl0cIIvG4bOMpJSRssXpE= +github.com/databricks/databricks-sdk-go v0.117.0/go.mod h1:hWoHnHbNLjPKiTm5K/7bcIv3J3Pkgo5x9pPzh8K3RVE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/python/databricks/bundles/pipelines/_models/pipelines_environment.py b/python/databricks/bundles/pipelines/_models/pipelines_environment.py index dd4d3ef81a..8c6ef19a0d 100644 --- a/python/databricks/bundles/pipelines/_models/pipelines_environment.py +++ b/python/databricks/bundles/pipelines/_models/pipelines_environment.py @@ -3,7 +3,7 @@ from databricks.bundles.core._transform import _transform from databricks.bundles.core._transform_to_json import _transform_to_json_value -from databricks.bundles.core._variable import VariableOrList +from databricks.bundles.core._variable import VariableOrList, VariableOrOptional if TYPE_CHECKING: from typing_extensions import Self @@ -23,6 +23,22 @@ class PipelinesEnvironment: Allowed dependency could be , , (WSFS or Volumes in Databricks), """ + environment_version: VariableOrOptional[str] = None + """ + :meta private: [EXPERIMENTAL] + + The environment version of the serverless Python environment used to execute + customer Python code. Each environment version includes a specific Python + version and a curated set of pre-installed libraries with defined versions, + providing a stable and reproducible execution environment. + + Databricks supports a three-year lifecycle for each environment version. + For available versions and their included packages, see + https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/ + + The value should be a string representing the environment version number, for example: `"4"`. + """ + @classmethod def from_dict(cls, value: "PipelinesEnvironmentDict") -> "Self": return _transform(cls, value) @@ -41,5 +57,21 @@ class PipelinesEnvironmentDict(TypedDict, total=False): Allowed dependency could be , , (WSFS or Volumes in Databricks), """ + environment_version: VariableOrOptional[str] + """ + :meta private: [EXPERIMENTAL] + + The environment version of the serverless Python environment used to execute + customer Python code. Each environment version includes a specific Python + version and a curated set of pre-installed libraries with defined versions, + providing a stable and reproducible execution environment. + + Databricks supports a three-year lifecycle for each environment version. + For available versions and their included packages, see + https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/ + + The value should be a string representing the environment version number, for example: `"4"`. + """ + PipelinesEnvironmentParam = PipelinesEnvironmentDict | PipelinesEnvironment