mirror of https://github.com/databricks/cli.git
ed194668db
## Changes This diagnostics type allows us to capture multiple warnings as well as errors in the return value. This is a preparation for returning additional warnings from mutators in case we detect non-fatal problems. * All return statements that previously returned an error now return `diag.FromErr` * All return statements that previously returned `fmt.Errorf` now return `diag.Errorf` * All `err != nil` checks now use `diags.HasError()` or `diags.Error()` ## Tests * Existing tests pass. * I confirmed no call site under `./bundle` or `./cmd/bundle` uses `errors.Is` on the return value from mutators. This is relevant because we cannot wrap errors with `%w` when calling `diag.Errorf` (like `fmt.Errorf`; context in https://github.com/golang/go/issues/47641). |
||
---|---|---|
.. | ||
bundles | ||
artifacts_test.go | ||
basic_test.go | ||
bind_resource_test.go | ||
deploy_then_remove_resources_test.go | ||
deployment_state_test.go | ||
empty_bundle_test.go | ||
generate_job_test.go | ||
generate_pipeline_test.go | ||
helpers.go | ||
job_metadata_test.go | ||
local_state_staleness_test.go | ||
python_wheel_test.go |