Repository navigation
Support best effort deployment history mode #7169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,6 @@ | |
| "serial": 0, | ||
| "plan": {}, | ||
| "features": { | ||
| "deployment_history": {} | ||
| "deployment_history_best_effort": {} | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| bundle: | ||
| name: dms-bind-unbind-$UNIQUE_NAME | ||
| experimental: | ||
| deployment_history: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how is deployment_history set in this test? It is set somehow since bind outputs "Error: bind is not supported for a bundle target that records deployment history" but I don't see where. Env var somewhere?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test only runs for |
||
|
|
||
| resources: | ||
| jobs: | ||
| foo: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,7 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged | |
| "lineage": "[UUID]", | ||
| "serial": 1, | ||
| "features": { | ||
| "deployment_history": {} | ||
| "deployment_history_best_effort": {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need the feature anymore with direct being source of truth, right? Sure older clients will not write to DMS but that's defensible for beta. Advantage is that you can drop DMS without any back migration.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed offline, we'll keep the state, but rename it to deployment_history_shadow in a followup PR. |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -79,18 +79,10 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | |
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]" | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources" | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]" | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources" | ||
| } | ||
|
|
||
| >>> print_state.py --no-dms | ||
| { | ||
|
|
@@ -99,9 +91,17 @@ Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | |
| "lineage": "[UUID]", | ||
| "serial": 1, | ||
| "features": { | ||
| "deployment_history": {} | ||
| "deployment_history_best_effort": {} | ||
| }, | ||
| "state": {} | ||
| "state": { | ||
| "resources.schemas.foo": { | ||
| "__id__": "main.dms_declined_deploy_schema_[UNIQUE_NAME]", | ||
| "state": { | ||
| "catalog_name": "main", | ||
| "name": "dms_declined_deploy_schema_[UNIQUE_NAME]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| === A destructive change without --auto-approve is declined: this console cannot prompt | ||
|
|
@@ -124,10 +124,6 @@ Files: 2 uploaded, 0 deleted | |
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]" | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources" | ||
| } | ||
|
|
||
| === The recorded resources are unchanged by the decline: the schema is still at version 1 | ||
| >>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json | ||
|
|
@@ -163,10 +159,6 @@ false | |
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]" | ||
| } | ||
| { | ||
| "method": "GET", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources" | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rename this in a followup.