databricks-cli/bundle/deploy
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
..
files Remove bundle.{Parallel,ReadOnlyBundle} (#2414) 2025-03-03 13:35:36 +00:00
lock Show actionable errors for collaborative deployment scenarios (#1386) 2024-10-10 11:18:23 +00:00
metadata Use CreatePipeline instead of PipelineSpec for resources.Pipeline struct (#2287) 2025-02-07 17:22:51 +00:00
terraform Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390) 2025-02-27 11:41:58 +00:00
filer.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
state.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
state_pull.go Remove bundle.{Parallel,ReadOnlyBundle} (#2414) 2025-03-03 13:35:36 +00:00
state_pull_test.go Remove bundle.{Parallel,ReadOnlyBundle} (#2414) 2025-03-03 13:35:36 +00:00
state_push.go Add an error if state files grow bigger than the export limit (#1795) 2024-10-02 13:53:24 +00:00
state_push_test.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
state_test.go Make fileset take optional list of paths to list (#1684) 2024-08-19 15:15:14 +00:00
state_update.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
state_update_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00