Commit 269568a
authored
Set engine based on state; refactor commands (#3797)
## Changes
### Engine selection
Engine is now selected based on available state, rather than env var.
The env var is still consulted if there are no local or remote state
files.
Since we need remote state, this is done during state-pull. This means
we don't know engine in bundle validate/summary and in deploy/destroy
until we reached that stage.
Since we don't know if remote is migrated, we pull both terraform state
and direct state all the time and decide based on serial number which to
use.
### Command refactoring
There are many commands that needed refactoring, so I extracted common
bundle steps in cmd/bundle/utils/process.go. This allows to enforce
certain order on how things are run and encode assumptions in one place.
For example, you cannot pull state until you called phases.Initialize()
because certain paths are not initialized.
## Why
This makes bundle engine setting sticky, once migrated to direct it'll
stay on direct. This will be important for subsequent 'bundle deployment
migrate' command.1 parent a4a1221 commit 269568a
File tree
103 files changed
+1514
-1616
lines changed- acceptance
- bundle
- python/experimental-compatibility-both-error
- resource_deps
- bad_ref_string_to_int
- missing_ingestion_definition
- state
- bad_json_local
- basic
- lineage_different
- state_present
- templates/default-python/integration_classic
- user_agent
- simple
- validate/job-references
- variables
- git-branch
- prepend-workspace-var
- pipelines/deploy/oss-spark-error
- bundle
- config
- deploy/terraform
- direct
- phases
- statemgmt
- cmd
- bundle
- debug
- deployment
- generate
- utils
- pipelines
- libs/template
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
103 files changed
+1514
-1616
lines changedLines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
17 | 48 | | |
18 | 49 | | |
19 | 50 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments