From 9549b00622a70bedb0f83909f16e8c31e266b89c Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 23 Jan 2025 11:25:38 +0100 Subject: [PATCH 1/4] Show warnings+ by default --- libs/flags/log_level_flag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/flags/log_level_flag.go b/libs/flags/log_level_flag.go index 836d84b700..82e2abc4c3 100644 --- a/libs/flags/log_level_flag.go +++ b/libs/flags/log_level_flag.go @@ -25,7 +25,7 @@ type LogLevelFlag struct { func NewLogLevelFlag() LogLevelFlag { return LogLevelFlag{ - l: log.LevelDisabled, + l: log.LevelWarn, } } From c9a4ee868b5edc287cb7eca56c0b8e8de1677450 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 23 Jan 2025 11:26:01 +0100 Subject: [PATCH 2/4] Do not show error for ErrAlreadyPrinted (it's already printed) --- cmd/root/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/root/root.go b/cmd/root/root.go index 3b37d01769..4d0d425624 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -114,10 +114,15 @@ func Execute(ctx context.Context, cmd *cobra.Command) error { if err == nil { logger.Info("completed execution", slog.String("exit_code", "0")) + } else if errors.Is(err, ErrAlreadyPrinted) { + logger.Debug("failed execution", + slog.String("exit_code", "1"), + ) } else { logger.Error("failed execution", slog.String("exit_code", "1"), - slog.String("error", err.Error())) + slog.String("error", err.Error()), + ) } } From 07f33b6a9fec8c19804a940ff47de403630d387c Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 23 Jan 2025 11:27:33 +0100 Subject: [PATCH 3/4] Update acceptance test output --- .../override/job_tasks/out.development.stderr.txt | 3 +++ acceptance/bundle/override/job_tasks/output.txt | 6 ++++++ acceptance/bundle/paths/fallback/output.txt | 6 ++++++ acceptance/bundle/paths/nominal/output.txt | 6 ++++++ acceptance/bundle/syncroot/dotdot-git/output.txt | 3 +++ acceptance/bundle/templates/dbt-sql/output.txt | 1 + acceptance/bundle/templates/default-python/output.txt | 1 + acceptance/bundle/templates/default-sql/output.txt | 1 + acceptance/bundle/undefined_resources/output.txt | 11 +++++++---- acceptance/bundle/variables/arg-repeat/output.txt | 1 + .../variables/complex-transitive-deeper/output.txt | 3 +++ acceptance/bundle/variables/cycle/output.txt | 3 +++ acceptance/bundle/variables/empty/output.txt | 3 +++ acceptance/bundle/variables/env_overrides/output.txt | 6 ++++++ acceptance/bundle/variables/host/output.txt | 6 ++++++ acceptance/bundle/variables/vanilla/output.txt | 3 +++ 16 files changed, 59 insertions(+), 4 deletions(-) diff --git a/acceptance/bundle/override/job_tasks/out.development.stderr.txt b/acceptance/bundle/override/job_tasks/out.development.stderr.txt index 7b6fef0cc1..b4267bc158 100644 --- a/acceptance/bundle/override/job_tasks/out.development.stderr.txt +++ b/acceptance/bundle/override/job_tasks/out.development.stderr.txt @@ -1,5 +1,8 @@ >>> errcode $CLI bundle validate -o json -t development +11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize mutator=seq mutator=TranslatePaths +11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize mutator=seq +11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize Error: file ./test1.py not found diff --git a/acceptance/bundle/override/job_tasks/output.txt b/acceptance/bundle/override/job_tasks/output.txt index 915351d4e9..7c2eb84928 100644 --- a/acceptance/bundle/override/job_tasks/output.txt +++ b/acceptance/bundle/override/job_tasks/output.txt @@ -29,6 +29,9 @@ } >>> errcode $CLI bundle validate -o json -t staging +11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize mutator=seq mutator=TranslatePaths +11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize mutator=seq +11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize Error: file ./test1.py not found @@ -64,6 +67,9 @@ Exit code: 1 } >>> errcode $CLI bundle validate -t staging +11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize mutator=seq mutator=TranslatePaths +11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize mutator=seq +11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize Error: file ./test1.py not found Name: override_job_tasks diff --git a/acceptance/bundle/paths/fallback/output.txt b/acceptance/bundle/paths/fallback/output.txt index f694610d2c..95aed9e845 100644 --- a/acceptance/bundle/paths/fallback/output.txt +++ b/acceptance/bundle/paths/fallback/output.txt @@ -4,6 +4,12 @@ Exit code: 0 >>> $CLI bundle validate -t error +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize mutator=seq mutator=TranslatePaths +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize mutator=seq +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize Error: notebook this value is overridden not found. Local notebook references are expected to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] diff --git a/acceptance/bundle/paths/nominal/output.txt b/acceptance/bundle/paths/nominal/output.txt index 1891703356..daf4e308d0 100644 --- a/acceptance/bundle/paths/nominal/output.txt +++ b/acceptance/bundle/paths/nominal/output.txt @@ -4,6 +4,12 @@ Exit code: 0 >>> $CLI bundle validate -t error +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize mutator=seq mutator=TranslatePaths +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize mutator=seq +11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected +to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize Error: notebook this value is overridden not found. Local notebook references are expected to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] diff --git a/acceptance/bundle/syncroot/dotdot-git/output.txt b/acceptance/bundle/syncroot/dotdot-git/output.txt index f1dc5fb014..119496e378 100644 --- a/acceptance/bundle/syncroot/dotdot-git/output.txt +++ b/acceptance/bundle/syncroot/dotdot-git/output.txt @@ -1,3 +1,6 @@ +11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync +11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate mutator (read-only)=parallel +11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" Name: test-bundle diff --git a/acceptance/bundle/templates/dbt-sql/output.txt b/acceptance/bundle/templates/dbt-sql/output.txt index 972c7e1529..49af094b18 100644 --- a/acceptance/bundle/templates/dbt-sql/output.txt +++ b/acceptance/bundle/templates/dbt-sql/output.txt @@ -22,6 +22,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod +11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3865 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_dbt_sql Target: prod Workspace: diff --git a/acceptance/bundle/templates/default-python/output.txt b/acceptance/bundle/templates/default-python/output.txt index 5493ac2cf7..aa424657b3 100644 --- a/acceptance/bundle/templates/default-python/output.txt +++ b/acceptance/bundle/templates/default-python/output.txt @@ -20,6 +20,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod +11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3862 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_default_python Target: prod Workspace: diff --git a/acceptance/bundle/templates/default-sql/output.txt b/acceptance/bundle/templates/default-sql/output.txt index fe01390931..b84696aa1f 100644 --- a/acceptance/bundle/templates/default-sql/output.txt +++ b/acceptance/bundle/templates/default-sql/output.txt @@ -22,6 +22,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod +11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3938 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_default_sql Target: prod Workspace: diff --git a/acceptance/bundle/undefined_resources/output.txt b/acceptance/bundle/undefined_resources/output.txt index 29b51bc1a5..e77805ed08 100644 --- a/acceptance/bundle/undefined_resources/output.txt +++ b/acceptance/bundle/undefined_resources/output.txt @@ -1,3 +1,10 @@ +11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize mutator=seq mutator=validate:AllResourcesHaveValues +11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize mutator=seq +11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize +Error: pipeline undefined-pipeline is not defined + at resources.pipelines.undefined-pipeline + in databricks.yml:14:24 + Error: experiment undefined-experiment is not defined at resources.experiments.undefined-experiment in databricks.yml:11:26 @@ -6,10 +13,6 @@ Error: job undefined-job is not defined at resources.jobs.undefined-job in databricks.yml:6:19 -Error: pipeline undefined-pipeline is not defined - at resources.pipelines.undefined-pipeline - in databricks.yml:14:24 - Found 3 errors Name: undefined-job diff --git a/acceptance/bundle/variables/arg-repeat/output.txt b/acceptance/bundle/variables/arg-repeat/output.txt index 48bd2033f4..66f5818011 100644 --- a/acceptance/bundle/variables/arg-repeat/output.txt +++ b/acceptance/bundle/variables/arg-repeat/output.txt @@ -10,6 +10,7 @@ Exit code: 0 } >>> errcode $CLI bundle validate --var a=one --var a=two +11:26:57 ERROR Error: failed to assign two to a: variable has already been assigned value: one pid=3768 mutator= Error: failed to assign two to a: variable has already been assigned value: one Name: arg-repeat diff --git a/acceptance/bundle/variables/complex-transitive-deeper/output.txt b/acceptance/bundle/variables/complex-transitive-deeper/output.txt index 3bedbfb9aa..fb973ebcff 100644 --- a/acceptance/bundle/variables/complex-transitive-deeper/output.txt +++ b/acceptance/bundle/variables/complex-transitive-deeper/output.txt @@ -1,3 +1,6 @@ +11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize mutator=seq mutator=ResolveVariableReferences +11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize mutator=seq +11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize Error: expected a map to index "variables.catalog.value.name", found string { diff --git a/acceptance/bundle/variables/cycle/output.txt b/acceptance/bundle/variables/cycle/output.txt index ea9c95cd46..53a203270c 100644 --- a/acceptance/bundle/variables/cycle/output.txt +++ b/acceptance/bundle/variables/cycle/output.txt @@ -1,3 +1,6 @@ +11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize mutator=seq mutator=ResolveVariableReferences +11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize mutator=seq +11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b { diff --git a/acceptance/bundle/variables/empty/output.txt b/acceptance/bundle/variables/empty/output.txt index 2616359206..823a0d9854 100644 --- a/acceptance/bundle/variables/empty/output.txt +++ b/acceptance/bundle/variables/empty/output.txt @@ -1,3 +1,6 @@ +11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize mutator=seq mutator=SetVariables +11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize mutator=seq +11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable Name: empty${var.a} diff --git a/acceptance/bundle/variables/env_overrides/output.txt b/acceptance/bundle/variables/env_overrides/output.txt index f42f82211a..31ee5266a3 100644 --- a/acceptance/bundle/variables/env_overrides/output.txt +++ b/acceptance/bundle/variables/env_overrides/output.txt @@ -9,6 +9,9 @@ "prod-a env-var-b" >>> errcode $CLI bundle validate -t env-missing-a-required-variable-assignment +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize mutator=seq mutator=SetVariables +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize mutator=seq +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable Name: test bundle @@ -22,6 +25,9 @@ Found 1 error Exit code: 1 >>> errcode $CLI bundle validate -t env-using-an-undefined-variable +11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load mutator=seq mutator=SelectTarget(env-using-an-undefined-variable) +11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load mutator=seq +11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load Error: variable c is not defined but is assigned a value Name: test bundle diff --git a/acceptance/bundle/variables/host/output.txt b/acceptance/bundle/variables/host/output.txt index 89342908c4..c8b1a31722 100644 --- a/acceptance/bundle/variables/host/output.txt +++ b/acceptance/bundle/variables/host/output.txt @@ -1,5 +1,8 @@ >>> errcode $CLI bundle validate -o json +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize mutator=seq mutator=PopulateCurrentUser +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize mutator=seq +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name { @@ -26,6 +29,9 @@ Error: failed during request visitor: parse "https://${var.host}": invalid chara Exit code: 1 >>> errcode $CLI bundle validate +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize mutator=seq mutator=PopulateCurrentUser +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize mutator=seq +11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name Name: host diff --git a/acceptance/bundle/variables/vanilla/output.txt b/acceptance/bundle/variables/vanilla/output.txt index 1d88bd0601..5d2d67e119 100644 --- a/acceptance/bundle/variables/vanilla/output.txt +++ b/acceptance/bundle/variables/vanilla/output.txt @@ -3,6 +3,9 @@ "abc def" >>> errcode $CLI bundle validate +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize mutator=seq mutator=SetVariables +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize mutator=seq +11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable Name: ${var.a} ${var.b} From efc48f105c2f584d7e3eea6108837eb29a82842c Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 23 Jan 2025 11:31:47 +0100 Subject: [PATCH 4/4] Do not log error after every mutator exit, it's redundant --- .../override/job_tasks/out.development.stderr.txt | 3 --- acceptance/bundle/override/job_tasks/output.txt | 6 ------ acceptance/bundle/paths/fallback/output.txt | 6 ------ acceptance/bundle/paths/nominal/output.txt | 6 ------ acceptance/bundle/syncroot/dotdot-git/output.txt | 3 --- acceptance/bundle/templates/dbt-sql/output.txt | 2 +- .../bundle/templates/default-python/output.txt | 2 +- acceptance/bundle/templates/default-sql/output.txt | 2 +- acceptance/bundle/undefined_resources/output.txt | 11 ++++------- acceptance/bundle/variables/arg-repeat/output.txt | 1 - .../variables/complex-transitive-deeper/output.txt | 3 --- acceptance/bundle/variables/cycle/output.txt | 3 --- acceptance/bundle/variables/empty/output.txt | 3 --- acceptance/bundle/variables/env_overrides/output.txt | 6 ------ acceptance/bundle/variables/host/output.txt | 6 ------ acceptance/bundle/variables/vanilla/output.txt | 3 --- bundle/mutator.go | 12 +----------- bundle/mutator_read_only.go | 7 +------ 18 files changed, 9 insertions(+), 76 deletions(-) diff --git a/acceptance/bundle/override/job_tasks/out.development.stderr.txt b/acceptance/bundle/override/job_tasks/out.development.stderr.txt index b4267bc158..7b6fef0cc1 100644 --- a/acceptance/bundle/override/job_tasks/out.development.stderr.txt +++ b/acceptance/bundle/override/job_tasks/out.development.stderr.txt @@ -1,8 +1,5 @@ >>> errcode $CLI bundle validate -o json -t development -11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize mutator=seq mutator=TranslatePaths -11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize mutator=seq -11:26:56 ERROR Error: file ./test1.py not found pid=3731 mutator=initialize Error: file ./test1.py not found diff --git a/acceptance/bundle/override/job_tasks/output.txt b/acceptance/bundle/override/job_tasks/output.txt index 7c2eb84928..915351d4e9 100644 --- a/acceptance/bundle/override/job_tasks/output.txt +++ b/acceptance/bundle/override/job_tasks/output.txt @@ -29,9 +29,6 @@ } >>> errcode $CLI bundle validate -o json -t staging -11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize mutator=seq mutator=TranslatePaths -11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize mutator=seq -11:26:56 ERROR Error: file ./test1.py not found pid=3757 mutator=initialize Error: file ./test1.py not found @@ -67,9 +64,6 @@ Exit code: 1 } >>> errcode $CLI bundle validate -t staging -11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize mutator=seq mutator=TranslatePaths -11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize mutator=seq -11:26:56 ERROR Error: file ./test1.py not found pid=3761 mutator=initialize Error: file ./test1.py not found Name: override_job_tasks diff --git a/acceptance/bundle/paths/fallback/output.txt b/acceptance/bundle/paths/fallback/output.txt index 95aed9e845..f694610d2c 100644 --- a/acceptance/bundle/paths/fallback/output.txt +++ b/acceptance/bundle/paths/fallback/output.txt @@ -4,12 +4,6 @@ Exit code: 0 >>> $CLI bundle validate -t error -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize mutator=seq mutator=TranslatePaths -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize mutator=seq -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3806 mutator=initialize Error: notebook this value is overridden not found. Local notebook references are expected to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] diff --git a/acceptance/bundle/paths/nominal/output.txt b/acceptance/bundle/paths/nominal/output.txt index daf4e308d0..1891703356 100644 --- a/acceptance/bundle/paths/nominal/output.txt +++ b/acceptance/bundle/paths/nominal/output.txt @@ -4,12 +4,6 @@ Exit code: 0 >>> $CLI bundle validate -t error -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize mutator=seq mutator=TranslatePaths -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize mutator=seq -11:26:57 ERROR Error: notebook this value is overridden not found. Local notebook references are expected -to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] pid=3814 mutator=initialize Error: notebook this value is overridden not found. Local notebook references are expected to contain one of the following file extensions: [.py, .r, .scala, .sql, .ipynb] diff --git a/acceptance/bundle/syncroot/dotdot-git/output.txt b/acceptance/bundle/syncroot/dotdot-git/output.txt index 119496e378..f1dc5fb014 100644 --- a/acceptance/bundle/syncroot/dotdot-git/output.txt +++ b/acceptance/bundle/syncroot/dotdot-git/output.txt @@ -1,6 +1,3 @@ -11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate mutator (read-only)=parallel mutator (read-only)=validate:files_to_sync -11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate mutator (read-only)=parallel -11:26:57 ERROR Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" pid=3887 mutator=validate Error: path "$TMPDIR" is not within repository root "$TMPDIR/myrepo" Name: test-bundle diff --git a/acceptance/bundle/templates/dbt-sql/output.txt b/acceptance/bundle/templates/dbt-sql/output.txt index 49af094b18..efd8be8157 100644 --- a/acceptance/bundle/templates/dbt-sql/output.txt +++ b/acceptance/bundle/templates/dbt-sql/output.txt @@ -22,7 +22,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod -11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3865 mutator=initialize mutator=seq mutator=ProcessTargetMode +11:31:28 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=20104 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_dbt_sql Target: prod Workspace: diff --git a/acceptance/bundle/templates/default-python/output.txt b/acceptance/bundle/templates/default-python/output.txt index aa424657b3..6db329b5b9 100644 --- a/acceptance/bundle/templates/default-python/output.txt +++ b/acceptance/bundle/templates/default-python/output.txt @@ -20,7 +20,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod -11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3862 mutator=initialize mutator=seq mutator=ProcessTargetMode +11:31:29 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=20387 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_default_python Target: prod Workspace: diff --git a/acceptance/bundle/templates/default-sql/output.txt b/acceptance/bundle/templates/default-sql/output.txt index b84696aa1f..b4fd270af8 100644 --- a/acceptance/bundle/templates/default-sql/output.txt +++ b/acceptance/bundle/templates/default-sql/output.txt @@ -22,7 +22,7 @@ Workspace: Validation OK! >>> $CLI bundle validate -t prod -11:26:57 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=3938 mutator=initialize mutator=seq mutator=ProcessTargetMode +11:31:29 WARN target with 'mode: production' should specify an explicit 'targets.prod.git' configuration pid=20374 mutator=initialize mutator=seq mutator=ProcessTargetMode Name: my_default_sql Target: prod Workspace: diff --git a/acceptance/bundle/undefined_resources/output.txt b/acceptance/bundle/undefined_resources/output.txt index e77805ed08..29b51bc1a5 100644 --- a/acceptance/bundle/undefined_resources/output.txt +++ b/acceptance/bundle/undefined_resources/output.txt @@ -1,10 +1,3 @@ -11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize mutator=seq mutator=validate:AllResourcesHaveValues -11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize mutator=seq -11:26:57 ERROR Error: pipeline undefined-pipeline is not defined pid=3810 mutator=initialize -Error: pipeline undefined-pipeline is not defined - at resources.pipelines.undefined-pipeline - in databricks.yml:14:24 - Error: experiment undefined-experiment is not defined at resources.experiments.undefined-experiment in databricks.yml:11:26 @@ -13,6 +6,10 @@ Error: job undefined-job is not defined at resources.jobs.undefined-job in databricks.yml:6:19 +Error: pipeline undefined-pipeline is not defined + at resources.pipelines.undefined-pipeline + in databricks.yml:14:24 + Found 3 errors Name: undefined-job diff --git a/acceptance/bundle/variables/arg-repeat/output.txt b/acceptance/bundle/variables/arg-repeat/output.txt index 66f5818011..48bd2033f4 100644 --- a/acceptance/bundle/variables/arg-repeat/output.txt +++ b/acceptance/bundle/variables/arg-repeat/output.txt @@ -10,7 +10,6 @@ Exit code: 0 } >>> errcode $CLI bundle validate --var a=one --var a=two -11:26:57 ERROR Error: failed to assign two to a: variable has already been assigned value: one pid=3768 mutator= Error: failed to assign two to a: variable has already been assigned value: one Name: arg-repeat diff --git a/acceptance/bundle/variables/complex-transitive-deeper/output.txt b/acceptance/bundle/variables/complex-transitive-deeper/output.txt index fb973ebcff..3bedbfb9aa 100644 --- a/acceptance/bundle/variables/complex-transitive-deeper/output.txt +++ b/acceptance/bundle/variables/complex-transitive-deeper/output.txt @@ -1,6 +1,3 @@ -11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize mutator=seq mutator=ResolveVariableReferences -11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize mutator=seq -11:26:57 ERROR Error: expected a map to index "variables.catalog.value.name", found string pid=3864 mutator=initialize Error: expected a map to index "variables.catalog.value.name", found string { diff --git a/acceptance/bundle/variables/cycle/output.txt b/acceptance/bundle/variables/cycle/output.txt index 53a203270c..ea9c95cd46 100644 --- a/acceptance/bundle/variables/cycle/output.txt +++ b/acceptance/bundle/variables/cycle/output.txt @@ -1,6 +1,3 @@ -11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize mutator=seq mutator=ResolveVariableReferences -11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize mutator=seq -11:26:57 ERROR Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b pid=3849 mutator=initialize Error: cycle detected in field resolution: variables.a.default -> var.b -> var.a -> var.b { diff --git a/acceptance/bundle/variables/empty/output.txt b/acceptance/bundle/variables/empty/output.txt index 823a0d9854..2616359206 100644 --- a/acceptance/bundle/variables/empty/output.txt +++ b/acceptance/bundle/variables/empty/output.txt @@ -1,6 +1,3 @@ -11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize mutator=seq mutator=SetVariables -11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize mutator=seq -11:26:57 ERROR Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable pid=3821 mutator=initialize Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable Name: empty${var.a} diff --git a/acceptance/bundle/variables/env_overrides/output.txt b/acceptance/bundle/variables/env_overrides/output.txt index 31ee5266a3..f42f82211a 100644 --- a/acceptance/bundle/variables/env_overrides/output.txt +++ b/acceptance/bundle/variables/env_overrides/output.txt @@ -9,9 +9,6 @@ "prod-a env-var-b" >>> errcode $CLI bundle validate -t env-missing-a-required-variable-assignment -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize mutator=seq mutator=SetVariables -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize mutator=seq -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=4097 mutator=initialize Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable Name: test bundle @@ -25,9 +22,6 @@ Found 1 error Exit code: 1 >>> errcode $CLI bundle validate -t env-using-an-undefined-variable -11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load mutator=seq mutator=SelectTarget(env-using-an-undefined-variable) -11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load mutator=seq -11:26:57 ERROR Error: variable c is not defined but is assigned a value pid=4110 mutator=load Error: variable c is not defined but is assigned a value Name: test bundle diff --git a/acceptance/bundle/variables/host/output.txt b/acceptance/bundle/variables/host/output.txt index c8b1a31722..89342908c4 100644 --- a/acceptance/bundle/variables/host/output.txt +++ b/acceptance/bundle/variables/host/output.txt @@ -1,8 +1,5 @@ >>> errcode $CLI bundle validate -o json -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize mutator=seq mutator=PopulateCurrentUser -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize mutator=seq -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4050 mutator=initialize Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name { @@ -29,9 +26,6 @@ Error: failed during request visitor: parse "https://${var.host}": invalid chara Exit code: 1 >>> errcode $CLI bundle validate -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize mutator=seq mutator=PopulateCurrentUser -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize mutator=seq -11:26:57 ERROR Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name pid=4054 mutator=initialize Error: failed during request visitor: parse "https://${var.host}": invalid character "{" in host name Name: host diff --git a/acceptance/bundle/variables/vanilla/output.txt b/acceptance/bundle/variables/vanilla/output.txt index 5d2d67e119..1d88bd0601 100644 --- a/acceptance/bundle/variables/vanilla/output.txt +++ b/acceptance/bundle/variables/vanilla/output.txt @@ -3,9 +3,6 @@ "abc def" >>> errcode $CLI bundle validate -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize mutator=seq mutator=SetVariables -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize mutator=seq -11:26:57 ERROR Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable pid=3780 mutator=initialize Error: no value assigned to required variable b. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_b environment variable Name: ${var.a} ${var.b} diff --git a/bundle/mutator.go b/bundle/mutator.go index 6c9968aacd..462d53d3f9 100644 --- a/bundle/mutator.go +++ b/bundle/mutator.go @@ -35,17 +35,7 @@ func Apply(ctx context.Context, b *Bundle, m Mutator) diag.Diagnostics { } }() - diags := m.Apply(ctx, b) - - // Log error in diagnostics if any. - // Note: errors should be logged when constructing them - // such that they are not logged multiple times. - // If this is done, we can omit this block. - if err := diags.Error(); err != nil { - log.Errorf(ctx, "Error: %s", err) - } - - return diags + return m.Apply(ctx, b) } type funcMutator struct { diff --git a/bundle/mutator_read_only.go b/bundle/mutator_read_only.go index ee4e36e0fa..777198f13e 100644 --- a/bundle/mutator_read_only.go +++ b/bundle/mutator_read_only.go @@ -20,10 +20,5 @@ func ApplyReadOnly(ctx context.Context, rb ReadOnlyBundle, m ReadOnlyMutator) di ctx = log.NewContext(ctx, log.GetLogger(ctx).With("mutator (read-only)", m.Name())) log.Debugf(ctx, "ApplyReadOnly") - diags := m.Apply(ctx, rb) - if err := diags.Error(); err != nil { - log.Errorf(ctx, "Error: %s", err) - } - - return diags + return m.Apply(ctx, rb) }