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) }