databricks-cli/cmd/bundle
Denis Bilenko e4cd782852
Remove bundle.{Parallel,ReadOnlyBundle} (#2414)
## Changes
- Remove bundle.Parallel & bundle.ReadOnlyBundle.
- Add bundle.ApplyParallel, as a helper to migrate from bundle.Parallel.
- Keep ReadOnlyMutator as a separate type but it's now a subtype of
Mutator so it works on regular *Bundle. Having it as a separate type
prevents non-readonly mutators being passed to ApplyParallel
- validate.Validate becomes a function (was Mutator).

## Why
This a follow up to #2390 where we removed most of the tools to
construct chains of mutators. Same motivation applies here.

When it comes to read-only bundles, it's a leaky abstraction -- since
it's a shallow copy, it does not actually guarantee or enforce readonly
access to bundle. A better approach would be to run parallel operations
on independent narrowly-focused deep-copied structs, with just enough
information to carry out the task (this is not implemented here, but the
eventual goal). Now that we can just write regular code in phases and
not limited to mutator interface, we can switch to that approach.

## Tests
Existing tests.

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2025-03-03 13:35:36 +00:00
..
debug Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
deployment Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
generate Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
utils Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
bundle.go Add command to open a resource in the browser (#1846) 2024-10-24 12:20:33 +00:00
debug.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deploy.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
destroy.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
generate.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
init.go Refactor `bundle init` (#2074) 2025-01-20 12:09:28 +00:00
launch.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
open.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
run.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
schema.go Make bundle JSON schema modular with `$defs` (#1700) 2024-09-10 13:55:18 +00:00
summary.go Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
sync.go Remove bundle.{Parallel,ReadOnlyBundle} (#2414) 2025-03-03 13:35:36 +00:00
test.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
validate.go Remove bundle.{Parallel,ReadOnlyBundle} (#2414) 2025-03-03 13:35:36 +00:00
variables.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00