From b350b11a5fd1ec4002aba32dc97bc2bb7b20ede8 Mon Sep 17 00:00:00 2001 From: Bhukya Date: Tue, 10 Nov 2026 00:13:46 +0000 Subject: [PATCH 1/2] Map a project folder after -e in environment dependencies to its deployed folder With DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true, a local project folder after -e, with optional extras such as -e ./project[test], maps to its deployed folder instead of failing. This applies to job and pipeline environment dependencies. With the variable off, the old behavior stays. Co-authored-by: Isaac --- .../editable-folder/databricks.yml | 26 +++++++++ .../editable-folder/out.test.toml | 2 + .../environments/editable-folder/output.txt | 15 +++++ .../editable-folder/project/pyproject.toml | 6 ++ .../environments/editable-folder/script | 7 +++ .../environments/editable-folder/test.toml | 7 +++ bundle/config/mutator/translate_paths.go | 24 ++++++++ bundle/config/mutator/translate_paths_test.go | 55 +++++++++++++++++++ bundle/env/experimental_pipeline_testing.go | 17 ++++++ 9 files changed, 159 insertions(+) create mode 100644 acceptance/bundle/environments/editable-folder/databricks.yml create mode 100644 acceptance/bundle/environments/editable-folder/out.test.toml create mode 100644 acceptance/bundle/environments/editable-folder/output.txt create mode 100644 acceptance/bundle/environments/editable-folder/project/pyproject.toml create mode 100644 acceptance/bundle/environments/editable-folder/script create mode 100644 acceptance/bundle/environments/editable-folder/test.toml create mode 100644 bundle/env/experimental_pipeline_testing.go diff --git a/acceptance/bundle/environments/editable-folder/databricks.yml b/acceptance/bundle/environments/editable-folder/databricks.yml new file mode 100644 index 00000000000..b6c43e86868 --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/databricks.yml @@ -0,0 +1,26 @@ +bundle: + name: editable-folder + +resources: + jobs: + my_job: + name: my job + tasks: + - task_key: main + python_wheel_task: + package_name: orders + entry_point: main + environment_key: default + environments: + - environment_key: default + spec: + client: "1" + dependencies: + - -e ./project + + pipelines: + my_pipeline: + name: my pipeline + environment: + dependencies: + - -e ./project[test] diff --git a/acceptance/bundle/environments/editable-folder/out.test.toml b/acceptance/bundle/environments/editable-folder/out.test.toml new file mode 100644 index 00000000000..a927a5fbc06 --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/out.test.toml @@ -0,0 +1,2 @@ +Cloud = false +EnvMatrix.DMS = ["", "true"] diff --git a/acceptance/bundle/environments/editable-folder/output.txt b/acceptance/bundle/environments/editable-folder/output.txt new file mode 100644 index 00000000000..acd2f1ee237 --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/output.txt @@ -0,0 +1,15 @@ + +=== With pipeline testing, a folder after -e maps to its deployed folder + +>>> [CLI] bundle validate -o json +{ + "job": [ + "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project" + ], + "pipeline": [ + "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]" + ] +} + +=== Without pipeline testing, a folder after -e is an error, as before +Error: unable to determine if [TEST_TMP_DIR]/project is not a notebook diff --git a/acceptance/bundle/environments/editable-folder/project/pyproject.toml b/acceptance/bundle/environments/editable-folder/project/pyproject.toml new file mode 100644 index 00000000000..468fddd1ca7 --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/project/pyproject.toml @@ -0,0 +1,6 @@ +[project] +name = "orders" +version = "0.1.0" + +[project.optional-dependencies] +test = ["faker"] diff --git a/acceptance/bundle/environments/editable-folder/script b/acceptance/bundle/environments/editable-folder/script new file mode 100644 index 00000000000..a9a2c4a9e4b --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/script @@ -0,0 +1,7 @@ +title "With pipeline testing, a folder after -e maps to its deployed folder\n" +trace $CLI bundle validate -o json | jq '{job: .resources.jobs.my_job.environments[0].spec.dependencies, pipeline: .resources.pipelines.my_pipeline.environment.dependencies}' + +title "Without pipeline testing, a folder after -e is an error, as before\n" +# The OS error after the message differs on Windows. +musterr env -u DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING $CLI bundle validate &> LOG.gate-off +grep -o 'Error: unable to determine if .* is not a notebook' LOG.gate-off diff --git a/acceptance/bundle/environments/editable-folder/test.toml b/acceptance/bundle/environments/editable-folder/test.toml new file mode 100644 index 00000000000..de87a97132d --- /dev/null +++ b/acceptance/bundle/environments/editable-folder/test.toml @@ -0,0 +1,7 @@ +Cloud = false +Env.DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING = "true" + +# Windows paths in the gate-off error. +[[Repls]] +Old = '\\' +New = '/' diff --git a/bundle/config/mutator/translate_paths.go b/bundle/config/mutator/translate_paths.go index 956d010ec95..774fa7a1919 100644 --- a/bundle/config/mutator/translate_paths.go +++ b/bundle/config/mutator/translate_paths.go @@ -16,6 +16,7 @@ import ( "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config/resources" + "github.com/databricks/cli/bundle/env" "github.com/databricks/cli/libs/diag" "github.com/databricks/cli/libs/dyn" "github.com/databricks/cli/libs/notebook" @@ -162,6 +163,15 @@ func (t *translateContext) rewritePath( localPath = filepath.ToSlash(localPath) localRelPath = filepath.ToSlash(localRelPath) + // With pipeline testing enabled, the path after -e can also be a project folder, with optional + // extras such as ./project[test]. The result is not cached: the cache key has no flag, so a + // later "-r ./project" would get the "-e" result instead of its error. + if opts.Mode == paths.TranslateModeEnvironmentPipFlag && flag == "-e" && env.ExperimentalPipelineTesting(ctx) { + if interp, ok := t.translateEditableFolder(localRelPath); ok { + return interp, nil + } + } + // Convert local path into workspace path via specified function. var interp string switch opts.Mode { @@ -251,6 +261,20 @@ func (t *translateContext) translateFilePath(ctx context.Context, literal, local return path.Join(t.remoteRoot, localRelPath), nil } +// translateEditableFolder maps a project folder after -e, with optional extras such as [test], to +// its deployed folder. It reports false if the path is not a folder in the sync root. +func (t *translateContext) translateEditableFolder(localRelPath string) (string, bool) { + folder, extras := localRelPath, "" + if i := strings.LastIndex(localRelPath, "["); i > 0 && strings.HasSuffix(localRelPath, "]") { + folder, extras = localRelPath[:i], localRelPath[i:] + } + info, err := t.b.SyncRoot.Stat(folder) + if err != nil || !info.IsDir() { + return "", false + } + return "-e " + path.Join(t.remoteRoot, folder) + extras, true +} + func (t *translateContext) translateDirectoryPath(ctx context.Context, literal, localFullPath, localRelPath string) (string, error) { if t.skipLocalFileValidation { return path.Join(t.remoteRoot, localRelPath), nil diff --git a/bundle/config/mutator/translate_paths_test.go b/bundle/config/mutator/translate_paths_test.go index 8aaf9ce9c71..fdaf2ac552b 100644 --- a/bundle/config/mutator/translate_paths_test.go +++ b/bundle/config/mutator/translate_paths_test.go @@ -8,6 +8,9 @@ import ( "runtime" "testing" + bundleenv "github.com/databricks/cli/bundle/env" + libsenv "github.com/databricks/cli/libs/env" + "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/config/mutator" @@ -816,6 +819,58 @@ func TestTranslatePathJobEnvironments(t *testing.T) { assert.Equal(t, "https://foo@bar.test/packages/pypi/simple", b.Config.Resources.Jobs["job"].Environments[0].Spec.Dependencies[6]) } +func TestTranslatePathEditableProjectFolder(t *testing.T) { + dir := t.TempDir() + touchEmptyFile(t, filepath.Join(dir, "project", "pyproject.toml")) + touchEmptyFile(t, filepath.Join(dir, "requirements.txt")) + + translate := func(ctx context.Context, dependencies ...string) (*bundle.Bundle, diag.Diagnostics) { + b := &bundle.Bundle{ + SyncRootPath: dir, + BundleRootPath: dir, + SyncRoot: vfs.MustNew(dir), + Config: config.Root{ + Workspace: config.Workspace{ + FilePath: "/bundle", + }, + Resources: config.Resources{ + Pipelines: map[string]*resources.Pipeline{ + "pipeline": { + CreatePipeline: pipelines.CreatePipeline{ + Environment: &pipelines.PipelinesEnvironment{Dependencies: dependencies}, + }, + }, + }, + }, + }, + } + bundletest.SetLocation(b, ".", []diag.Location{{File: filepath.Join(dir, "fake.yml")}}) + return b, bundle.ApplySeq(ctx, b, mutator.NormalizePaths(), mutator.TranslatePaths()) + } + + // Without pipeline testing, a folder after -e stays an error, as it was before the feature. + _, diags := translate(t.Context(), "-e ./project") + assert.ErrorContains(t, diags.Error(), "unable to determine if "+filepath.Join(dir, "project")+" is not a notebook") + + ctx := libsenv.Set(t.Context(), bundleenv.ExperimentalPipelineTestingVariable, "true") + b, diags := translate(ctx, "-e ./project", "-e ./project[test]", "-e .", "-e .[test]", "-r ./requirements.txt") + require.NoError(t, diags.Error()) + assert.Equal(t, []string{ + "-e /bundle/project", + "-e /bundle/project[test]", + "-e /bundle", + "-e /bundle[test]", + "-r /bundle/requirements.txt", + }, b.Config.Resources.Pipelines["pipeline"].Environment.Dependencies) + + // -r takes a file, so a folder after it is still an error, also after the same folder after -e. + notebookErr := "unable to determine if " + filepath.Join(dir, "project") + " is not a notebook" + _, diags = translate(ctx, "-r ./project") + assert.ErrorContains(t, diags.Error(), notebookErr) + _, diags = translate(ctx, "-e ./project", "-r ./project") + assert.ErrorContains(t, diags.Error(), notebookErr) +} + func TestTranslatePathWithComplexVariables(t *testing.T) { dir := t.TempDir() b := &bundle.Bundle{ diff --git a/bundle/env/experimental_pipeline_testing.go b/bundle/env/experimental_pipeline_testing.go new file mode 100644 index 00000000000..b00a94176e9 --- /dev/null +++ b/bundle/env/experimental_pipeline_testing.go @@ -0,0 +1,17 @@ +package env + +import ( + "context" + + envlib "github.com/databricks/cli/libs/env" +) + +// ExperimentalPipelineTestingVariable enables the experimental testing property of pipelines. +const ExperimentalPipelineTestingVariable = "DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING" + +// ExperimentalPipelineTesting reports whether the experimental testing property of pipelines is +// enabled. While it is off, bundles deploy pipelines exactly as they did before the property existed. +func ExperimentalPipelineTesting(ctx context.Context) bool { + enabled, _ := envlib.GetBool(ctx, ExperimentalPipelineTestingVariable) + return enabled +} From 24212b4edd41679d9f7cf4a8dd479bb7c5ff8f60 Mon Sep 17 00:00:00 2001 From: Bhukya Date: Wed, 11 Nov 2026 19:48:28 +0000 Subject: [PATCH 2/2] Map a project folder after -e without the pipeline testing variable --- .../bundles/editable-project-folder.md | 1 + .../environments/dependencies/databricks.yml | 4 +++ .../environments/dependencies/output.txt | 10 ++++++- .../project/pyproject.toml | 0 .../editable-folder/databricks.yml | 26 ------------------- .../editable-folder/out.test.toml | 2 -- .../environments/editable-folder/output.txt | 15 ----------- .../environments/editable-folder/script | 7 ----- .../environments/editable-folder/test.toml | 7 ----- bundle/config/mutator/translate_paths.go | 9 +++---- bundle/config/mutator/translate_paths_test.go | 9 +------ bundle/env/experimental_pipeline_testing.go | 17 ------------ 12 files changed, 19 insertions(+), 88 deletions(-) create mode 100644 .nextchanges/bundles/editable-project-folder.md rename acceptance/bundle/environments/{editable-folder => dependencies}/project/pyproject.toml (100%) delete mode 100644 acceptance/bundle/environments/editable-folder/databricks.yml delete mode 100644 acceptance/bundle/environments/editable-folder/out.test.toml delete mode 100644 acceptance/bundle/environments/editable-folder/output.txt delete mode 100644 acceptance/bundle/environments/editable-folder/script delete mode 100644 acceptance/bundle/environments/editable-folder/test.toml delete mode 100644 bundle/env/experimental_pipeline_testing.go diff --git a/.nextchanges/bundles/editable-project-folder.md b/.nextchanges/bundles/editable-project-folder.md new file mode 100644 index 00000000000..67c32a42019 --- /dev/null +++ b/.nextchanges/bundles/editable-project-folder.md @@ -0,0 +1 @@ +* A project folder after `-e` in job and pipeline environment dependencies, with optional extras such as `-e ./project[test]`, now maps to its deployed folder. Before, it failed with "unable to determine if ... is not a notebook". ([#7427](https://github.com/databricks/cli/pull/7427)) diff --git a/acceptance/bundle/environments/dependencies/databricks.yml b/acceptance/bundle/environments/dependencies/databricks.yml index 3fd067837f7..a76fca7bbf6 100644 --- a/acceptance/bundle/environments/dependencies/databricks.yml +++ b/acceptance/bundle/environments/dependencies/databricks.yml @@ -24,6 +24,8 @@ resources: - -r "${workspace.file_path}/Path With Spaces/requirements.txt" - "-r '${workspace.file_path}/Path With Spaces/requirements.txt'" - "-e ./file.py" + - "-e ./project" + - "-e ./project[test]" - "-i http://myindexurl.com" - "--index-url http://myindexurl.com" - "test_package" @@ -44,6 +46,8 @@ resources: dependencies: - "-r ./requirements.txt" - "-e ./file.py" + - "-e ./project" + - "-e ./project[test]" - "-i http://myindexurl.com" - "--index-url http://myindexurl.com" - "dist/*.whl" diff --git a/acceptance/bundle/environments/dependencies/output.txt b/acceptance/bundle/environments/dependencies/output.txt index 83a11d75cc8..5bab6f938ee 100644 --- a/acceptance/bundle/environments/dependencies/output.txt +++ b/acceptance/bundle/environments/dependencies/output.txt @@ -13,7 +13,7 @@ Uploading dist/test.whl... Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files... Created jobs.test_job Created pipelines.test_pipeline -Files: 5 uploaded, 0 deleted +Files: 6 uploaded, 0 deleted Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.environments [OUTPUT_DIR]/out.requests.txt @@ -27,6 +27,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged "-r \"/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt\"", "-r '/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt'", "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project[test]", "-i http://myindexurl.com", "--index-url http://myindexurl.com", "test_package", @@ -68,6 +70,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged "dependencies": [ "-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt", "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project[test]", "-i http://myindexurl.com", "--index-url http://myindexurl.com", "/Workspace/Users/[USERNAME]/.bundle/dependencies/default/artifacts/.internal/test.whl", @@ -96,6 +100,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged "-r \"/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt\"", "-r '/Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/Path With Spaces/requirements.txt'", "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project[test]", "-i http://myindexurl.com", "--index-url http://myindexurl.com", "test_package", @@ -127,6 +133,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged "dependencies": [ "-r /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/requirements.txt", "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/file.py", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project", + "-e /Workspace/Users/[USERNAME]/.bundle/dependencies/default/files/project[test]", "-i http://myindexurl.com", "--index-url http://myindexurl.com", "./dist/*.whl", diff --git a/acceptance/bundle/environments/editable-folder/project/pyproject.toml b/acceptance/bundle/environments/dependencies/project/pyproject.toml similarity index 100% rename from acceptance/bundle/environments/editable-folder/project/pyproject.toml rename to acceptance/bundle/environments/dependencies/project/pyproject.toml diff --git a/acceptance/bundle/environments/editable-folder/databricks.yml b/acceptance/bundle/environments/editable-folder/databricks.yml deleted file mode 100644 index b6c43e86868..00000000000 --- a/acceptance/bundle/environments/editable-folder/databricks.yml +++ /dev/null @@ -1,26 +0,0 @@ -bundle: - name: editable-folder - -resources: - jobs: - my_job: - name: my job - tasks: - - task_key: main - python_wheel_task: - package_name: orders - entry_point: main - environment_key: default - environments: - - environment_key: default - spec: - client: "1" - dependencies: - - -e ./project - - pipelines: - my_pipeline: - name: my pipeline - environment: - dependencies: - - -e ./project[test] diff --git a/acceptance/bundle/environments/editable-folder/out.test.toml b/acceptance/bundle/environments/editable-folder/out.test.toml deleted file mode 100644 index a927a5fbc06..00000000000 --- a/acceptance/bundle/environments/editable-folder/out.test.toml +++ /dev/null @@ -1,2 +0,0 @@ -Cloud = false -EnvMatrix.DMS = ["", "true"] diff --git a/acceptance/bundle/environments/editable-folder/output.txt b/acceptance/bundle/environments/editable-folder/output.txt deleted file mode 100644 index acd2f1ee237..00000000000 --- a/acceptance/bundle/environments/editable-folder/output.txt +++ /dev/null @@ -1,15 +0,0 @@ - -=== With pipeline testing, a folder after -e maps to its deployed folder - ->>> [CLI] bundle validate -o json -{ - "job": [ - "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project" - ], - "pipeline": [ - "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]" - ] -} - -=== Without pipeline testing, a folder after -e is an error, as before -Error: unable to determine if [TEST_TMP_DIR]/project is not a notebook diff --git a/acceptance/bundle/environments/editable-folder/script b/acceptance/bundle/environments/editable-folder/script deleted file mode 100644 index a9a2c4a9e4b..00000000000 --- a/acceptance/bundle/environments/editable-folder/script +++ /dev/null @@ -1,7 +0,0 @@ -title "With pipeline testing, a folder after -e maps to its deployed folder\n" -trace $CLI bundle validate -o json | jq '{job: .resources.jobs.my_job.environments[0].spec.dependencies, pipeline: .resources.pipelines.my_pipeline.environment.dependencies}' - -title "Without pipeline testing, a folder after -e is an error, as before\n" -# The OS error after the message differs on Windows. -musterr env -u DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING $CLI bundle validate &> LOG.gate-off -grep -o 'Error: unable to determine if .* is not a notebook' LOG.gate-off diff --git a/acceptance/bundle/environments/editable-folder/test.toml b/acceptance/bundle/environments/editable-folder/test.toml deleted file mode 100644 index de87a97132d..00000000000 --- a/acceptance/bundle/environments/editable-folder/test.toml +++ /dev/null @@ -1,7 +0,0 @@ -Cloud = false -Env.DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING = "true" - -# Windows paths in the gate-off error. -[[Repls]] -Old = '\\' -New = '/' diff --git a/bundle/config/mutator/translate_paths.go b/bundle/config/mutator/translate_paths.go index 774fa7a1919..5ad9510692c 100644 --- a/bundle/config/mutator/translate_paths.go +++ b/bundle/config/mutator/translate_paths.go @@ -16,7 +16,6 @@ import ( "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config/resources" - "github.com/databricks/cli/bundle/env" "github.com/databricks/cli/libs/diag" "github.com/databricks/cli/libs/dyn" "github.com/databricks/cli/libs/notebook" @@ -163,10 +162,10 @@ func (t *translateContext) rewritePath( localPath = filepath.ToSlash(localPath) localRelPath = filepath.ToSlash(localRelPath) - // With pipeline testing enabled, the path after -e can also be a project folder, with optional - // extras such as ./project[test]. The result is not cached: the cache key has no flag, so a - // later "-r ./project" would get the "-e" result instead of its error. - if opts.Mode == paths.TranslateModeEnvironmentPipFlag && flag == "-e" && env.ExperimentalPipelineTesting(ctx) { + // The path after -e can also be a project folder, with optional extras such as ./project[test]. + // The result is not cached: the cache key has no flag, so a later "-r ./project" would get the + // "-e" result instead of its error. + if opts.Mode == paths.TranslateModeEnvironmentPipFlag && flag == "-e" { if interp, ok := t.translateEditableFolder(localRelPath); ok { return interp, nil } diff --git a/bundle/config/mutator/translate_paths_test.go b/bundle/config/mutator/translate_paths_test.go index fdaf2ac552b..106662ed802 100644 --- a/bundle/config/mutator/translate_paths_test.go +++ b/bundle/config/mutator/translate_paths_test.go @@ -8,9 +8,6 @@ import ( "runtime" "testing" - bundleenv "github.com/databricks/cli/bundle/env" - libsenv "github.com/databricks/cli/libs/env" - "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/config/mutator" @@ -848,11 +845,7 @@ func TestTranslatePathEditableProjectFolder(t *testing.T) { return b, bundle.ApplySeq(ctx, b, mutator.NormalizePaths(), mutator.TranslatePaths()) } - // Without pipeline testing, a folder after -e stays an error, as it was before the feature. - _, diags := translate(t.Context(), "-e ./project") - assert.ErrorContains(t, diags.Error(), "unable to determine if "+filepath.Join(dir, "project")+" is not a notebook") - - ctx := libsenv.Set(t.Context(), bundleenv.ExperimentalPipelineTestingVariable, "true") + ctx := t.Context() b, diags := translate(ctx, "-e ./project", "-e ./project[test]", "-e .", "-e .[test]", "-r ./requirements.txt") require.NoError(t, diags.Error()) assert.Equal(t, []string{ diff --git a/bundle/env/experimental_pipeline_testing.go b/bundle/env/experimental_pipeline_testing.go deleted file mode 100644 index b00a94176e9..00000000000 --- a/bundle/env/experimental_pipeline_testing.go +++ /dev/null @@ -1,17 +0,0 @@ -package env - -import ( - "context" - - envlib "github.com/databricks/cli/libs/env" -) - -// ExperimentalPipelineTestingVariable enables the experimental testing property of pipelines. -const ExperimentalPipelineTestingVariable = "DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING" - -// ExperimentalPipelineTesting reports whether the experimental testing property of pipelines is -// enabled. While it is off, bundles deploy pipelines exactly as they did before the property existed. -func ExperimentalPipelineTesting(ctx context.Context) bool { - enabled, _ := envlib.GetBool(ctx, ExperimentalPipelineTestingVariable) - return enabled -}