Skip to content

Commit e6ef421

Browse files
Skip history versions without operations and refresh mode fixtures
1 parent 2b37ce6 commit e6ef421

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎acceptance/bundle/deploy/readplan/lineage-mismatch/plan.dms.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"serial": 0,
66
"plan": {},
77
"features": {
8-
"deployment_history": {}
8+
"deployment_history_best_effort": {}
99
}
1010
}

‎acceptance/bundle/state/feature_flags/reject_new/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
Error: migrating state [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: the deployment state requires features this CLI does not support: [FEATURE]; upgrade to the latest CLI version and see https://docs.databricks.com/aws/en/dev-tools/bundles/state-features#state-features for more information
44

55

6-
>>> cmp resources.v3.[FEATURE].json .databricks/bundle/default/resources.json
6+
>>> cmp [STATE_FILE] .databricks/bundle/default/resources.json
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
EnvMatrix.STATE_FILE = ["resources.v2.future_feature.json", "resources.v3.future_feature.json", "resources.v2.deployment_history.json", "resources.v3.deployment_history.json"]
22

3+
[[Repls]]
4+
Old = 'resources[.]v[23][.](future_feature|deployment_history)[.]json'
5+
New = '[STATE_FILE]'
6+
37
[[Repls]]
48
Old = 'future_feature|deployment_history'
59
New = '[FEATURE]'

‎bundle/phases/dms.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func prepareDestroyHistory(ctx context.Context, b *bundle.Bundle, plan *deploypl
188188
// A no-op when the bundle does not record deployment history.
189189
func startVersion(ctx context.Context, b *bundle.Bundle, versionType dms.VersionType, staged []bundledeployments.StagedOperation) error {
190190
db := &b.DeploymentBundle
191-
if !db.StateDB.RecordsHistory() {
191+
if !db.StateDB.RecordsHistory() || len(staged) == 0 {
192192
return nil
193193
}
194194
w := b.WorkspaceClient(ctx)

0 commit comments

Comments
 (0)