Skip to content

Commit

Permalink
Move merge fix-ups after variable resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Jan 13, 2025
1 parent d525ff6 commit cfbc33d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
18 changes: 4 additions & 14 deletions acceptance/bundle/override/job_cluster_var/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"job_clusters": [
{
"job_cluster_key": "key",
"new_cluster": {
"spark_version": "13.3.x-scala2.12"
}
},
{
"job_cluster_key": "key",
"new_cluster": {
"node_type_id": "i3.xlarge",
"num_workers": 1
"num_workers": 1,
"spark_version": "13.3.x-scala2.12"
}
}
],
Expand Down Expand Up @@ -51,17 +46,12 @@ Validation OK!
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"job_clusters": [
{
"job_cluster_key": "key",
"new_cluster": {
"spark_version": "13.3.x-scala2.12"
}
},
{
"job_cluster_key": "key",
"new_cluster": {
"node_type_id": "i3.2xlarge",
"num_workers": 4
"num_workers": 4,
"spark_version": "13.3.x-scala2.12"
}
}
],
Expand Down
10 changes: 6 additions & 4 deletions bundle/phases/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ func Initialize() bundle.Mutator {
// If it is an ancestor, this updates all paths to be relative to the sync root path.
mutator.SyncInferRoot(),

mutator.MergeJobClusters(),
mutator.MergeJobParameters(),
mutator.MergeJobTasks(),
mutator.MergePipelineClusters(),
mutator.InitializeWorkspaceClient(),
mutator.PopulateCurrentUser(),
mutator.LoadGitDetails(),
Expand Down Expand Up @@ -70,6 +66,12 @@ func Initialize() bundle.Mutator {
"workspace",
"variables",
),

mutator.MergeJobClusters(),
mutator.MergeJobParameters(),
mutator.MergeJobTasks(),
mutator.MergePipelineClusters(),

// Provide permission config errors & warnings after initializing all variables
permissions.PermissionDiagnostics(),
mutator.SetRunAs(),
Expand Down

0 comments on commit cfbc33d

Please sign in to comment.