You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d91d668
Browse filesBrowse the repository at this point in the historyBrowse files
direct: separate advice for deploy and delete when another object is at the recorded ID
- Deploy suggests pointing the config at the renamed object, or unbind and bind; delete says no delete is sent and suggests deleting it outside the bundle.
- The Gone comments mention another object at the recorded ID.
- foreign_at_recorded_name and recreated_at_recorded_name show the failed deploy's requests; the plan step uses plan_filter.py.
aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name
Co-authored-by: Isaac <no-reply@databricks.com>
=== The other schema has another schema_id, so the plan does not take it for the bundle's: it plans a create
19
19
20
20
>>> [CLI] bundle plan --output json
21
-
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle leaves it in place. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
21
+
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle does not take it for its own. If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again.
22
22
23
23
{
24
-
"resources.schemas.schema1": {
25
-
"action": "create",
26
-
"new_state": {
27
-
"value": {
28
-
"catalog_name": "main",
29
-
"comment": "c1",
30
-
"name": "test-schema-[UNIQUE_NAME]"
31
-
}
32
-
},
33
-
"changes": {
34
-
"schema_id": {
35
-
"action": "skip",
36
-
"reason": "internal_id",
37
-
"old": "[SCHEMA_ID]"
24
+
"plan_version": [PLAN_VERSION],
25
+
"cli_version": "[CLI_VERSION]",
26
+
"lineage": "[UUID]",
27
+
"serial": 1,
28
+
"plan": {
29
+
"resources.schemas.schema1": {
30
+
"action": "create",
31
+
"new_state": {
32
+
"value": {
33
+
"catalog_name": "main",
34
+
"comment": "c1",
35
+
"name": "test-schema-[UNIQUE_NAME]"
36
+
}
37
+
},
38
+
"changes": {
39
+
"schema_id": {
40
+
"action": "skip",
41
+
"reason": "internal_id",
42
+
"old": "[SCHEMA_ID]"
43
+
}
38
44
}
39
45
}
40
46
}
@@ -44,7 +50,7 @@ Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds an
44
50
45
51
>>> musterr [CLI] bundle deploy
46
52
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
47
-
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle leaves it in place. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
53
+
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle does not take it for its own. If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again.
@@ -55,10 +61,21 @@ API message: Schema 'test-schema-[UNIQUE_NAME]' already exists
55
61
56
62
Files: 2 uploaded, 0 deleted
57
63
64
+
>>> print_requests.py //unity-catalog
65
+
{
66
+
"method": "POST",
67
+
"path": "/api/2.1/unity-catalog/schemas",
68
+
"body": {
69
+
"catalog_name": "main",
70
+
"comment": "c1",
71
+
"name": "test-schema-[UNIQUE_NAME]"
72
+
}
73
+
}
74
+
58
75
=== Destroy does not delete the other schema: it only drops the bundle's from the state
59
76
60
77
>>> [CLI] bundle destroy --auto-approve
61
-
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle leaves it in place, and drops resources.schemas.schema1 from the deployment state. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
78
+
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[FOREIGN_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so no delete is sent for it, and resources.schemas.schema1 is dropped from the deployment state. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle.
62
79
63
80
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
=== The new schema has another schema_id: the bundle does not take it for its own, and deploy fails on its name
15
15
16
16
>>> [CLI] bundle plan
17
-
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[NEW_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle leaves it in place. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
17
+
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[NEW_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle does not take it for its own. If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again.
18
18
19
19
create schemas.schema1
20
20
21
21
Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
22
22
23
23
>>> musterr [CLI] bundle deploy
24
24
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
25
-
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[NEW_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle leaves it in place. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
25
+
Warning: resources.schemas.schema1: id="main.test-schema-[UNIQUE_NAME]" holds another object: its schema_id is "[NEW_SCHEMA_ID]", not "[SCHEMA_ID]" as recorded, so this bundle does not take it for its own. If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again.
=== The other volume has another volume_id, so the plan does not take it for the bundle's: it plans a create
19
19
20
20
>>> [CLI] bundle plan
21
-
Warning: resources.volumes.volume1: id="main.test-schema-[UNIQUE_NAME].myvolume" holds another object: its volume_id is "[FOREIGN_VOLUME_ID]", not "[VOLUME_ID]" as recorded, so this bundle leaves it in place. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
21
+
Warning: resources.volumes.volume1: id="main.test-schema-[UNIQUE_NAME].myvolume" holds another object: its volume_id is "[FOREIGN_VOLUME_ID]", not "[VOLUME_ID]" as recorded, so this bundle does not take it for its own. If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again.
22
22
23
23
create volumes.volume1
24
24
@@ -27,7 +27,7 @@ Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
27
27
=== Destroy does not delete the other volume: it only drops the bundle's from the state
28
28
29
29
>>> [CLI] bundle destroy --auto-approve
30
-
Warning: resources.volumes.volume1: id="main.test-schema-[UNIQUE_NAME].myvolume" holds another object: its volume_id is "[FOREIGN_VOLUME_ID]", not "[VOLUME_ID]" as recorded, so this bundle leaves it in place, and drops resources.volumes.volume1 from the deployment state. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it).
30
+
Warning: resources.volumes.volume1: id="main.test-schema-[UNIQUE_NAME].myvolume" holds another object: its volume_id is "[FOREIGN_VOLUME_ID]", not "[VOLUME_ID]" as recorded, so no delete is sent for it, and resources.volumes.volume1 is dropped from the deployment state. If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle.
31
31
32
32
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
// otherObjectAdvice follows otherObjectMessage, for a resource still in the config (deploy) as well as
934
-
// one removed from it (a Delete): bind needs the resource in the config, and a free state entry.
935
-
constotherObjectAdvice="If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle, or manage it again with 'bundle deployment bind' while it is in the config ('bundle deployment unbind' first if the state still has it)."
933
+
// otherObjectDeployAdvice follows otherObjectMessage for a resource in the config. The bundle's own
934
+
// may still exist under another name (renamed out of band), which findMoved takes once the config
935
+
// names it. Bind needs a free state entry, hence unbind first.
936
+
constotherObjectDeployAdvice="If the bundle's was renamed outside the bundle, set its name in the config to the new one. If this object is the bundle's (deleted and created again outside the bundle), run 'bundle deployment unbind' and then 'bundle deployment bind' to manage it again."
937
+
938
+
// otherObjectDeleteAdvice follows otherObjectMessage for a resource being deleted: its state entry
939
+
// is dropped, and it may no longer be in the config, so binding it is not an option.
940
+
constotherObjectDeleteAdvice="If it is the bundle's (deleted and created again outside the bundle), delete it outside the bundle."
936
941
937
942
// otherObjectAtRecordedID returns, for a resource to be deleted, what otherObjectMessage says when
938
943
// remote, read at its recorded ID id, is another object than the one the state records; "" when it
0 commit comments