diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 0f6f41e913e..ba91a0d1dcb 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -103,6 +103,10 @@ const ( // The tests the don't set SERVERLESS variable or set to empty string will also be run. EnvFilterVar = "ENVFILTER" + // Set to "true" by test environments that cannot create classic compute, so + // tests marked RequiresClassic are skipped there. + EnvNoClassic = "DATABRICKS_TEST_NO_CLASSIC" + // File where scripts can output custom replacements // export $job_id=100200300 // $ echo "$job_id:MY_JOB" >> ACC_REPLS # This will replace 100200300 with [MY_JOB] in the output @@ -721,6 +725,10 @@ func getSkipReason(config *internal.TestConfig, configPath, dir, skipLocalMode s return fmt.Sprintf("Disabled via RequiresCluster setting in %s (TEST_DEFAULT_CLUSTER_ID is empty)", configPath) } + if isTruePtr(config.RequiresClassic) && os.Getenv(EnvNoClassic) == "true" { + return fmt.Sprintf("Disabled via RequiresClassic setting in %s (%s=true)", configPath, EnvNoClassic) + } + } else { // Local run if !isTruePtr(config.Local) { diff --git a/acceptance/bundle/apps/job_permissions/test.toml b/acceptance/bundle/apps/job_permissions/test.toml index f54e2a6f9e7..d4c8f77a399 100644 --- a/acceptance/bundle/apps/job_permissions/test.toml +++ b/acceptance/bundle/apps/job_permissions/test.toml @@ -1,6 +1,8 @@ Cloud = true RequiresUnityCatalog = true RecordRequests = false +# Deploys a job with a spark_python_task, which runs on a cluster. +RequiresClassic = true [EnvMatrix] DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/config-remote-sync/dashboard_etag/test.toml b/acceptance/bundle/config-remote-sync/dashboard_etag/test.toml index b0adfc8e33b..434424518e7 100644 --- a/acceptance/bundle/config-remote-sync/dashboard_etag/test.toml +++ b/acceptance/bundle/config-remote-sync/dashboard_etag/test.toml @@ -1,6 +1,10 @@ Cloud = true RequiresWarehouse = true +# Unlike its siblings this test syncs a dashboard, not a job cluster, so it runs +# in serverless-only environments. +RequiresClassic = false + RecordRequests = false Ignore = [".databricks", "databricks.yml", "databricks.yml.backup"] diff --git a/acceptance/bundle/config-remote-sync/test.toml b/acceptance/bundle/config-remote-sync/test.toml index 4ab67cee71a..708491d53c9 100644 --- a/acceptance/bundle/config-remote-sync/test.toml +++ b/acceptance/bundle/config-remote-sync/test.toml @@ -1,3 +1,8 @@ +# These tests sync job config that defines a job cluster, so they need an +# environment where classic compute can be created. dashboard_etag overrides +# this back to false: it syncs a dashboard bound to a SQL warehouse. +RequiresClassic = true + # Disable Windows tests for config-remote-sync tests [GOOS] windows = false diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml index e2a0ac696d1..871479b7e5e 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster (new_cluster) +RequiresClassic = true Ignore = [ "databricks.yml", diff --git a/acceptance/bundle/deploy/mlops-stacks/test.toml b/acceptance/bundle/deploy/mlops-stacks/test.toml index 8348f7996d0..076a64ccc1f 100644 --- a/acceptance/bundle/deploy/mlops-stacks/test.toml +++ b/acceptance/bundle/deploy/mlops-stacks/test.toml @@ -1,5 +1,6 @@ Cloud=true Local=true +RequiresClassic = true # The MLOps Stacks template registers the model in Unity Catalog and runs its # jobs on serverless compute, so this test only works on a UC-enabled workspace diff --git a/acceptance/bundle/deploy/snapshot-comparison/test.toml b/acceptance/bundle/deploy/snapshot-comparison/test.toml index 51bdb7525a9..6d34cd49843 100644 --- a/acceptance/bundle/deploy/snapshot-comparison/test.toml +++ b/acceptance/bundle/deploy/snapshot-comparison/test.toml @@ -1,4 +1,6 @@ Cloud = true +# Deploys a pipeline and job; pipelines run on classic compute +RequiresClassic = true RecordRequests = true diff --git a/acceptance/bundle/deploy/spark-jar-task/test.toml b/acceptance/bundle/deploy/spark-jar-task/test.toml index 86ea49e050c..e2659650f5e 100644 --- a/acceptance/bundle/deploy/spark-jar-task/test.toml +++ b/acceptance/bundle/deploy/spark-jar-task/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster and spark_jar_task +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] Ignore = [ diff --git a/acceptance/bundle/deployment/bind/cluster/test.toml b/acceptance/bundle/deployment/bind/cluster/test.toml index bebdb0bbcde..932153e9329 100644 --- a/acceptance/bundle/deployment/bind/cluster/test.toml +++ b/acceptance/bundle/deployment/bind/cluster/test.toml @@ -1,3 +1,5 @@ Local = true Cloud = true RequiresCluster = true +# Tests bind an all-purpose cluster to a bundle +RequiresClassic = true diff --git a/acceptance/bundle/deployment/bind/job/test.toml b/acceptance/bundle/deployment/bind/job/test.toml new file mode 100644 index 00000000000..db6ed773dd2 --- /dev/null +++ b/acceptance/bundle/deployment/bind/job/test.toml @@ -0,0 +1,2 @@ +# Cloud tests deploy job clusters (classic compute resources) +RequiresClassic = true diff --git a/acceptance/bundle/deployment/bind/pipelines/recreate/test.toml b/acceptance/bundle/deployment/bind/pipelines/recreate/test.toml index ded8808b22f..1d209dcfa5a 100644 --- a/acceptance/bundle/deployment/bind/pipelines/recreate/test.toml +++ b/acceptance/bundle/deployment/bind/pipelines/recreate/test.toml @@ -1,3 +1,5 @@ Cloud = true +# Tests bind a pipeline to a bundle; pipelines run on classic compute +RequiresClassic = true RecordRequests = true Ignore = [".databricks", "pipeline.json"] diff --git a/acceptance/bundle/destroy/jobs-and-pipeline/test.toml b/acceptance/bundle/destroy/jobs-and-pipeline/test.toml index c653d325c58..ad09a0eacbb 100644 --- a/acceptance/bundle/destroy/jobs-and-pipeline/test.toml +++ b/acceptance/bundle/destroy/jobs-and-pipeline/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Destroys jobs with job clusters and a pipeline +RequiresClassic = true Ignore = [ "databricks.yml", diff --git a/acceptance/bundle/generate/auto-bind/test.toml b/acceptance/bundle/generate/auto-bind/test.toml index bff5fb6afe5..238d5bb0d23 100644 --- a/acceptance/bundle/generate/auto-bind/test.toml +++ b/acceptance/bundle/generate/auto-bind/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Generates and binds a job with a job cluster +RequiresClassic = true Ignore = [ "databricks.yml", diff --git a/acceptance/bundle/generate/pipeline_and_deploy/test.toml b/acceptance/bundle/generate/pipeline_and_deploy/test.toml index 3eba85b404a..135a840e469 100644 --- a/acceptance/bundle/generate/pipeline_and_deploy/test.toml +++ b/acceptance/bundle/generate/pipeline_and_deploy/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Generates from a pipeline and deploys it; pipelines run on classic compute +RequiresClassic = true Ignore = [ "databricks.yml", diff --git a/acceptance/bundle/generate/python_job_and_deploy/test.toml b/acceptance/bundle/generate/python_job_and_deploy/test.toml index 3eba85b404a..6196fd0f6b9 100644 --- a/acceptance/bundle/generate/python_job_and_deploy/test.toml +++ b/acceptance/bundle/generate/python_job_and_deploy/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Generates from a job with a job cluster and deploys it +RequiresClassic = true Ignore = [ "databricks.yml", diff --git a/acceptance/bundle/integration_whl/test.toml b/acceptance/bundle/integration_whl/test.toml index d97c489629e..3c6e4241511 100644 --- a/acceptance/bundle/integration_whl/test.toml +++ b/acceptance/bundle/integration_whl/test.toml @@ -1,5 +1,6 @@ Local = true CloudSlow = true +RequiresClassic = true # Workspace file system does not allow initializing python envs on it. # I suspect something about the default python env on DBR interferes with it. diff --git a/acceptance/bundle/invariant/test.toml b/acceptance/bundle/invariant/test.toml index 1d0d883f6d5..c165b8abc65 100644 --- a/acceptance/bundle/invariant/test.toml +++ b/acceptance/bundle/invariant/test.toml @@ -1,6 +1,7 @@ Local = true Cloud = true RequiresUnityCatalog = true +RequiresClassic = true Timeout = '10m' Ignore = [ diff --git a/acceptance/bundle/local_state_staleness/test.toml b/acceptance/bundle/local_state_staleness/test.toml index e93d23f722b..f0880cd292d 100644 --- a/acceptance/bundle/local_state_staleness/test.toml +++ b/acceptance/bundle/local_state_staleness/test.toml @@ -1,2 +1,4 @@ Cloud = true Local = true +# Tests local state staleness with a job that has a job cluster +RequiresClassic = true diff --git a/acceptance/bundle/python/mutator-permissions-owner-5682/test.toml b/acceptance/bundle/python/mutator-permissions-owner-5682/test.toml index 476b9209ae6..fe6c1995af1 100644 --- a/acceptance/bundle/python/mutator-permissions-owner-5682/test.toml +++ b/acceptance/bundle/python/mutator-permissions-owner-5682/test.toml @@ -1,2 +1,4 @@ Cloud = true RequiresUnityCatalog = true +# Deploys a pipeline, which runs on classic compute +RequiresClassic = true diff --git a/acceptance/bundle/resources/clusters/deploy/data_security_mode/out.test.toml b/acceptance/bundle/resources/clusters/deploy/data_security_mode/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/clusters/deploy/data_security_mode/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/data_security_mode/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/instance_pool/out.test.toml b/acceptance/bundle/resources/clusters/deploy/instance_pool/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/instance_pool/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/instance_pool/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/instance_pool_and_node_type/out.test.toml b/acceptance/bundle/resources/clusters/deploy/instance_pool_and_node_type/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/instance_pool_and_node_type/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/instance_pool_and_node_type/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/out.test.toml b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/out.test.toml index 5a821e39edc..b5f045aacd1 100644 --- a/acceptance/bundle/resources/clusters/deploy/local_ssd_count/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/local_ssd_count/out.test.toml @@ -1,5 +1,6 @@ Local = true Cloud = true +RequiresClassic = true CloudEnvs.aws = false CloudEnvs.azure = false CloudEnvs.gcp = true diff --git a/acceptance/bundle/resources/clusters/deploy/num_workers_absent/out.test.toml b/acceptance/bundle/resources/clusters/deploy/num_workers_absent/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/num_workers_absent/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/num_workers_absent/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/simple/out.test.toml b/acceptance/bundle/resources/clusters/deploy/simple/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/clusters/deploy/simple/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/simple/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/update-after-create/out.test.toml b/acceptance/bundle/resources/clusters/deploy/update-after-create/out.test.toml index bbc7fcfd1bd..2fc5fb27481 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-after-create/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/update-after-create/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.test.toml b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.test.toml b/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/deploy/workload_type/out.test.toml b/acceptance/bundle/resources/clusters/deploy/workload_type/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/clusters/deploy/workload_type/out.test.toml +++ b/acceptance/bundle/resources/clusters/deploy/workload_type/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/lifecycle-started-terraform-error/out.test.toml b/acceptance/bundle/resources/clusters/lifecycle-started-terraform-error/out.test.toml index 42c0997090a..a1cc5332e17 100644 --- a/acceptance/bundle/resources/clusters/lifecycle-started-terraform-error/out.test.toml +++ b/acceptance/bundle/resources/clusters/lifecycle-started-terraform-error/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform"] diff --git a/acceptance/bundle/resources/clusters/lifecycle-started-toggle/out.test.toml b/acceptance/bundle/resources/clusters/lifecycle-started-toggle/out.test.toml index 9cfad3fb0d5..ee942a3175a 100644 --- a/acceptance/bundle/resources/clusters/lifecycle-started-toggle/out.test.toml +++ b/acceptance/bundle/resources/clusters/lifecycle-started-toggle/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] diff --git a/acceptance/bundle/resources/clusters/lifecycle-started/out.test.toml b/acceptance/bundle/resources/clusters/lifecycle-started/out.test.toml index 9cfad3fb0d5..ee942a3175a 100644 --- a/acceptance/bundle/resources/clusters/lifecycle-started/out.test.toml +++ b/acceptance/bundle/resources/clusters/lifecycle-started/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] diff --git a/acceptance/bundle/resources/clusters/readplan-lifecycle/out.test.toml b/acceptance/bundle/resources/clusters/readplan-lifecycle/out.test.toml index 71970b719d4..a168ebc22fc 100644 --- a/acceptance/bundle/resources/clusters/readplan-lifecycle/out.test.toml +++ b/acceptance/bundle/resources/clusters/readplan-lifecycle/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] EnvMatrix.READPLAN = ["", "1"] diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/out.test.toml b/acceptance/bundle/resources/clusters/resize-terminated-fallback/out.test.toml index 9cfad3fb0d5..ee942a3175a 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/out.test.toml +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/out.test.toml b/acceptance/bundle/resources/clusters/run/spark_python_task/out.test.toml index 475b179caed..ecded540e4d 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/out.test.toml +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/out.test.toml @@ -1,5 +1,6 @@ Local = true Cloud = true CloudSlow = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/clusters/test.toml b/acceptance/bundle/resources/clusters/test.toml new file mode 100644 index 00000000000..f650ddd31ab --- /dev/null +++ b/acceptance/bundle/resources/clusters/test.toml @@ -0,0 +1,2 @@ +# Cloud tests deploy all-purpose and job clusters (classic compute resources) +RequiresClassic = true diff --git a/acceptance/bundle/resources/jobs/check-metadata/out.test.toml b/acceptance/bundle/resources/jobs/check-metadata/out.test.toml index bbc7fcfd1bd..2fc5fb27481 100644 --- a/acceptance/bundle/resources/jobs/check-metadata/out.test.toml +++ b/acceptance/bundle/resources/jobs/check-metadata/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/jobs/check-metadata/test.toml b/acceptance/bundle/resources/jobs/check-metadata/test.toml index 060ef7c77d8..0da6060369d 100644 --- a/acceptance/bundle/resources/jobs/check-metadata/test.toml +++ b/acceptance/bundle/resources/jobs/check-metadata/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster to test metadata +RequiresClassic = true RecordRequests = false Ignore = [ diff --git a/acceptance/bundle/resources/jobs/double-underscore-keys/out.test.toml b/acceptance/bundle/resources/jobs/double-underscore-keys/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/jobs/double-underscore-keys/out.test.toml +++ b/acceptance/bundle/resources/jobs/double-underscore-keys/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/jobs/double-underscore-keys/test.toml b/acceptance/bundle/resources/jobs/double-underscore-keys/test.toml index c469454658b..b9142abef3a 100644 --- a/acceptance/bundle/resources/jobs/double-underscore-keys/test.toml +++ b/acceptance/bundle/resources/jobs/double-underscore-keys/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys jobs with job clusters +RequiresClassic = true RecordRequests = false RunsOnDbr = true diff --git a/acceptance/bundle/resources/jobs/fail-on-active-runs/out.test.toml b/acceptance/bundle/resources/jobs/fail-on-active-runs/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/jobs/fail-on-active-runs/out.test.toml +++ b/acceptance/bundle/resources/jobs/fail-on-active-runs/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/jobs/fail-on-active-runs/test.toml b/acceptance/bundle/resources/jobs/fail-on-active-runs/test.toml index c469454658b..f2d5bc8c769 100644 --- a/acceptance/bundle/resources/jobs/fail-on-active-runs/test.toml +++ b/acceptance/bundle/resources/jobs/fail-on-active-runs/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster to test active run prevention +RequiresClassic = true RecordRequests = false RunsOnDbr = true diff --git a/acceptance/bundle/resources/jobs/no-git-provider/out.test.toml b/acceptance/bundle/resources/jobs/no-git-provider/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/jobs/no-git-provider/out.test.toml +++ b/acceptance/bundle/resources/jobs/no-git-provider/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/jobs/no-git-provider/test.toml b/acceptance/bundle/resources/jobs/no-git-provider/test.toml index 2dbb113fb51..3e9cf72b67b 100644 --- a/acceptance/bundle/resources/jobs/no-git-provider/test.toml +++ b/acceptance/bundle/resources/jobs/no-git-provider/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster and notebook task +RequiresClassic = true RecordRequests = false RunsOnDbr = true diff --git a/acceptance/bundle/resources/jobs/shared-root-path/out.test.toml b/acceptance/bundle/resources/jobs/shared-root-path/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/jobs/shared-root-path/out.test.toml +++ b/acceptance/bundle/resources/jobs/shared-root-path/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/jobs/shared-root-path/test.toml b/acceptance/bundle/resources/jobs/shared-root-path/test.toml index c469454658b..ca59b3e5c64 100644 --- a/acceptance/bundle/resources/jobs/shared-root-path/test.toml +++ b/acceptance/bundle/resources/jobs/shared-root-path/test.toml @@ -1,5 +1,7 @@ Local = true Cloud = true +# Deploys a job with a job cluster to Shared workspace path +RequiresClassic = true RecordRequests = false RunsOnDbr = true diff --git a/acceptance/bundle/resources/permissions/factcheck/out.test.toml b/acceptance/bundle/resources/permissions/factcheck/out.test.toml index 581c975b773..8e4bc801abb 100644 --- a/acceptance/bundle/resources/permissions/factcheck/out.test.toml +++ b/acceptance/bundle/resources/permissions/factcheck/out.test.toml @@ -1,6 +1,7 @@ Local = true Cloud = true CloudSlow = true +RequiresClassic = true RunsOnDbr = true CloudEnvs.gcp = false EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/permissions/factcheck/test.toml b/acceptance/bundle/resources/permissions/factcheck/test.toml index e28d280b8a9..5fdc4017f81 100644 --- a/acceptance/bundle/resources/permissions/factcheck/test.toml +++ b/acceptance/bundle/resources/permissions/factcheck/test.toml @@ -1,5 +1,6 @@ Local = true CloudSlow = true +RequiresClassic = true RecordRequests = false RunsOnDbr = true diff --git a/acceptance/bundle/resources/permissions/jobs/delete_one/out.test.toml b/acceptance/bundle/resources/permissions/jobs/delete_one/out.test.toml index e849ec85ace..b3d61fdbcea 100644 --- a/acceptance/bundle/resources/permissions/jobs/delete_one/out.test.toml +++ b/acceptance/bundle/resources/permissions/jobs/delete_one/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true RequiresUnityCatalog = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/permissions/jobs/delete_one/test.toml b/acceptance/bundle/resources/permissions/jobs/delete_one/test.toml index f993a98ecc7..7a7813c8d36 100644 --- a/acceptance/bundle/resources/permissions/jobs/delete_one/test.toml +++ b/acceptance/bundle/resources/permissions/jobs/delete_one/test.toml @@ -2,3 +2,5 @@ Local = true Cloud = true IsServicePrincipal = true RequiresUnityCatalog = true +# Deploys a job with a notebook_task, which runs on a cluster. +RequiresClassic = true diff --git a/acceptance/bundle/resources/pipelines/allow-duplicate-names/out.test.toml b/acceptance/bundle/resources/pipelines/allow-duplicate-names/out.test.toml index bbc7fcfd1bd..2fc5fb27481 100644 --- a/acceptance/bundle/resources/pipelines/allow-duplicate-names/out.test.toml +++ b/acceptance/bundle/resources/pipelines/allow-duplicate-names/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/auto-approve/out.test.toml b/acceptance/bundle/resources/pipelines/auto-approve/out.test.toml index 5ad0addb75e..85a562dd136 100644 --- a/acceptance/bundle/resources/pipelines/auto-approve/out.test.toml +++ b/acceptance/bundle/resources/pipelines/auto-approve/out.test.toml @@ -1,4 +1,5 @@ Local = true Cloud = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/drift/parameters/out.test.toml b/acceptance/bundle/resources/pipelines/drift/parameters/out.test.toml index e90b6d5d1ba..1fee4a5153e 100644 --- a/acceptance/bundle/resources/pipelines/drift/parameters/out.test.toml +++ b/acceptance/bundle/resources/pipelines/drift/parameters/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] diff --git a/acceptance/bundle/resources/pipelines/lakeflow-pipeline/out.test.toml b/acceptance/bundle/resources/pipelines/lakeflow-pipeline/out.test.toml index bbc7fcfd1bd..2fc5fb27481 100644 --- a/acceptance/bundle/resources/pipelines/lakeflow-pipeline/out.test.toml +++ b/acceptance/bundle/resources/pipelines/lakeflow-pipeline/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/num-workers-zero/out.test.toml b/acceptance/bundle/resources/pipelines/num-workers-zero/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/num-workers-zero/out.test.toml +++ b/acceptance/bundle/resources/pipelines/num-workers-zero/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/photon-true/out.test.toml b/acceptance/bundle/resources/pipelines/photon-true/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/photon-true/out.test.toml +++ b/acceptance/bundle/resources/pipelines/photon-true/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.test.toml b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.test.toml +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.test.toml b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.test.toml +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/recreate/out.test.toml b/acceptance/bundle/resources/pipelines/recreate/out.test.toml index 6e3397efe53..dcf686c17d1 100644 --- a/acceptance/bundle/resources/pipelines/recreate/out.test.toml +++ b/acceptance/bundle/resources/pipelines/recreate/out.test.toml @@ -1,5 +1,6 @@ Local = true Cloud = true RequiresUnityCatalog = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/remote_matches_config/out.test.toml b/acceptance/bundle/resources/pipelines/remote_matches_config/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/remote_matches_config/out.test.toml +++ b/acceptance/bundle/resources/pipelines/remote_matches_config/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/test.toml b/acceptance/bundle/resources/pipelines/test.toml new file mode 100644 index 00000000000..17066fc3752 --- /dev/null +++ b/acceptance/bundle/resources/pipelines/test.toml @@ -0,0 +1,2 @@ +# Cloud tests require classic compute to deploy Databricks SQL pipelines +RequiresClassic = true diff --git a/acceptance/bundle/resources/pipelines/update/out.test.toml b/acceptance/bundle/resources/pipelines/update/out.test.toml index bbc7fcfd1bd..2fc5fb27481 100644 --- a/acceptance/bundle/resources/pipelines/update/out.test.toml +++ b/acceptance/bundle/resources/pipelines/update/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = true +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/pipelines/zero-value-fields/out.test.toml b/acceptance/bundle/resources/pipelines/zero-value-fields/out.test.toml index f784a183258..8b230e353ce 100644 --- a/acceptance/bundle/resources/pipelines/zero-value-fields/out.test.toml +++ b/acceptance/bundle/resources/pipelines/zero-value-fields/out.test.toml @@ -1,3 +1,4 @@ Local = true Cloud = false +RequiresClassic = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/schemas/auto-approve/out.test.toml b/acceptance/bundle/resources/schemas/auto-approve/out.test.toml index 6e3397efe53..dcf686c17d1 100644 --- a/acceptance/bundle/resources/schemas/auto-approve/out.test.toml +++ b/acceptance/bundle/resources/schemas/auto-approve/out.test.toml @@ -1,5 +1,6 @@ Local = true Cloud = true RequiresUnityCatalog = true +RequiresClassic = true RunsOnDbr = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/resources/schemas/auto-approve/test.toml b/acceptance/bundle/resources/schemas/auto-approve/test.toml index 150da453b7e..3e2825abd3e 100644 --- a/acceptance/bundle/resources/schemas/auto-approve/test.toml +++ b/acceptance/bundle/resources/schemas/auto-approve/test.toml @@ -3,6 +3,7 @@ Cloud = true RecordRequests = false RunsOnDbr = true RequiresUnityCatalog = true +RequiresClassic = true Ignore = [ ".databricks", diff --git a/acceptance/bundle/run/app-with-job/test.toml b/acceptance/bundle/run/app-with-job/test.toml index e52b058972e..c7376bdb8a6 100644 --- a/acceptance/bundle/run/app-with-job/test.toml +++ b/acceptance/bundle/run/app-with-job/test.toml @@ -8,6 +8,7 @@ Local = true # This test includes 2 application starts, and it is taking aroung 420 seconds to complete the entire test # CloudSlow = true +RequiresClassic = true Ignore = [ 'databricks.yml', diff --git a/acceptance/bundle/run_as/job_default/test.toml b/acceptance/bundle/run_as/job_default/test.toml index b89975e30a6..2a46dfe2adb 100644 --- a/acceptance/bundle/run_as/job_default/test.toml +++ b/acceptance/bundle/run_as/job_default/test.toml @@ -3,6 +3,8 @@ Ignore = [".databricks/.gitignore"] Local = true Cloud = true +# Deploys a job with a job cluster and run_as configuration +RequiresClassic = true RecordRequests = true [EnvMatrix] diff --git a/acceptance/bundle/templates/default-python/integration_classic/test.toml b/acceptance/bundle/templates/default-python/integration_classic/test.toml index 4d358acdc89..15247b8ba6f 100644 --- a/acceptance/bundle/templates/default-python/integration_classic/test.toml +++ b/acceptance/bundle/templates/default-python/integration_classic/test.toml @@ -1,4 +1,5 @@ Cloud = true +RequiresClassic = true Timeout = '1m' Ignore = [ diff --git a/acceptance/cmd/bundle/dms-cloud-read/out.test.toml b/acceptance/cmd/bundle/dms-cloud-read/out.test.toml new file mode 100644 index 00000000000..74537b8656b --- /dev/null +++ b/acceptance/cmd/bundle/dms-cloud-read/out.test.toml @@ -0,0 +1,6 @@ +Local = false +Cloud = true +CloudEnvs.aws = true +CloudEnvs.azure = false +CloudEnvs.gcp = false +EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] diff --git a/acceptance/cmd/bundle/dms-cloud-read/output.txt b/acceptance/cmd/bundle/dms-cloud-read/output.txt new file mode 100644 index 00000000000..c9dab77c421 --- /dev/null +++ b/acceptance/cmd/bundle/dms-cloud-read/output.txt @@ -0,0 +1,23 @@ + +>>> [CLI] bundle-deployments list-deployments +"array" + +>>> errcode [CLI] bundle-deployments get-deployment deployments/[NUMID] +Error: deployment 1 in workspace [NUMID] not found + +Exit code: 1 + +>>> errcode [CLI] bundle-deployments list-versions deployments/[NUMID] +Error: deployment 1 in workspace [NUMID] not found + +Exit code: 1 + +>>> errcode [CLI] bundle-deployments list-resources deployments/[NUMID] +Error: deployment 1 in workspace [NUMID] not found + +Exit code: 1 + +>>> errcode [CLI] bundle-deployments list-operations deployments/[NUMID]/versions/1 +Error: deployment 1 in workspace [NUMID] not found + +Exit code: 1 diff --git a/acceptance/cmd/bundle/dms-cloud-read/script b/acceptance/cmd/bundle/dms-cloud-read/script new file mode 100644 index 00000000000..a5025f38613 --- /dev/null +++ b/acceptance/cmd/bundle/dms-cloud-read/script @@ -0,0 +1,22 @@ +# DMS is placed on DEV and STAGING shards only, and CLOUD_ENV cannot tell the +# staging env apart from the prod ones (both set CLOUD_ENV=aws). The workspace +# host can: staging control planes carry ".staging." in the domain. Skip +# elsewhere rather than fail, so adding this test to the shared cloud matrix +# does not red-line the prod envs. +case "$DATABRICKS_HOST" in + *.staging.*) ;; + *) echo "DMS is deployed to staging only; skipping on $DATABRICKS_HOST"; exit 0 ;; +esac + +# list-deployments returns every deployment in the workspace, so assert on its +# shape rather than its contents: the set grows as other tests and engineers +# deploy, and the ids are server-assigned. +trace $CLI bundle-deployments list-deployments | jq 'if type == "array" then "array" else . end' + +# A deployment id that cannot exist. DMS resolves the workspace and runs the +# permission check before it looks for the row, so a clean NotFound proves the +# whole read path is reachable, not just the front door. +trace errcode $CLI bundle-deployments get-deployment deployments/1 +trace errcode $CLI bundle-deployments list-versions deployments/1 +trace errcode $CLI bundle-deployments list-resources deployments/1 +trace errcode $CLI bundle-deployments list-operations deployments/1/versions/1 diff --git a/acceptance/cmd/bundle/dms-cloud-read/test.toml b/acceptance/cmd/bundle/dms-cloud-read/test.toml new file mode 100644 index 00000000000..f45e37febb3 --- /dev/null +++ b/acceptance/cmd/bundle/dms-cloud-read/test.toml @@ -0,0 +1,25 @@ +# Cloud read-path test for the `databricks bundle-deployments` (DMS) commands. +# +# DMS is placed on DEV and STAGING shards only; on a prod control plane the +# routes do not exist and every request 404s at the API proxy. CLOUD_ENV cannot +# express that split (the staging and prod aws envs both set CLOUD_ENV=aws), so +# `script` gates on the workspace host instead and skips off staging. Drop that +# guard once DMS reaches prod, and this becomes a plain aws cloud test. +Cloud = true +Local = false +CloudEnvs = {aws = true, azure = false, gcp = false} + +# bundle-deployments is a workspace-service command, independent of the bundle +# deploy engine. Pin to one engine so the suite runs the case once rather than +# twice; an empty list would instead run it on both CI runners. +EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] + +# Deployment ids are server-assigned and workspace-scoped, so both the ids and +# the enclosing workspace id vary per run. +[[Repls]] +Old = 'deployments/[0-9]+' +New = 'deployments/[NUMID]' + +[[Repls]] +Old = 'in workspace [0-9]+' +New = 'in workspace [NUMID]' diff --git a/acceptance/internal/config.go b/acceptance/internal/config.go index 4e349b33e7d..9c29fe37bc0 100644 --- a/acceptance/internal/config.go +++ b/acceptance/internal/config.go @@ -58,6 +58,12 @@ type TestConfig struct { // If true and Cloud=true, run this test only if a default test cluster is available in the cloud environment RequiresCluster *bool + // If true and Cloud=true, run this test only where classic compute can be + // created. Set it on any test that deploys an all-purpose cluster, a job + // cluster, or an instance pool. Serverless-only test environments export + // DATABRICKS_TEST_NO_CLASSIC=true, which skips these. + RequiresClassic *bool + // If true and Cloud=true, run this test only if a default warehouse is available in the cloud environment RequiresWarehouse *bool diff --git a/acceptance/internal/materialized_config.go b/acceptance/internal/materialized_config.go index 0fa5d43657d..0c8cc1be2c1 100644 --- a/acceptance/internal/materialized_config.go +++ b/acceptance/internal/materialized_config.go @@ -45,6 +45,7 @@ func GenerateMaterializedConfig(config *TestConfig) string { writeBool(&buf, "CloudSlow", config.CloudSlow) writeBool(&buf, "RequiresUnityCatalog", config.RequiresUnityCatalog) writeBool(&buf, "RequiresCluster", config.RequiresCluster) + writeBool(&buf, "RequiresClassic", config.RequiresClassic) writeBool(&buf, "RequiresWarehouse", config.RequiresWarehouse) writeBool(&buf, "RunsOnDbr", config.RunsOnDbr) if config.Phase != 0 {