Skip to content

Manage registered model aliases on deploy - #7163

Open
andrewnester wants to merge 1 commit into
mainfrom
fix/4012
Open

andrewnester wants to merge 1 commit into
mainfrom
fix/4012

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Changes

Registered model aliases are now set in Unity Catalog on deploy instead of being silently ignored.
A model without an aliases section keeps the aliases set outside the bundle (for example by MLflow), and aliases: [] removes them.

Why

Fixes #4012

Tests

Added acceptance tests

@github-actions

Copy link
Copy Markdown
Contributor

Commit: a8b4bdd7d | Workflow run

Regression test report

Selected 3 changed tests (limit=20, 0 not selected)

7 tests: regression=7 unreleased=0 coverage=0 failing=0

test branch main (66fce77) latest (v1.22.1)
TestAccept/bundle/deployment/bind/registered-model-aliases/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases_converge/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/aliases_converge/DMS=true ✅ ❌ ❌
TestAccept/bundle/deployment/bind/registered-model-aliases/DMS=: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/deployment/bind/registered-model-aliases/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindregistered-model-aliasesDMS=2093296520/002/output.txt
        @@ -20,7 +20,6 @@
         Plan: update resources.registered_models.model1
         
         Changes detected:
        -  ~ aliases: null -> [{"alias_name":"test","version_num":1},{"alias_name":"staging","version_num":2}]
           ~ comment: null -> "Managed by the bundle"
         
         Error: this bind operation requires user confirmation, but the current console does not support prompting.
        @@ -43,40 +42,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.test-registered-model-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "test",
        +        "version_num": 1
        +      },
        +      {
        +        "alias_name": "staging",
        +        "version_num": 2
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "Managed by the bundle",
             "name": "test-registered-model-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.test-registered-model-[UNIQUE_NAME]/aliases/test",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.test-registered-model-[UNIQUE_NAME]/aliases/staging",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.test-registered-model-[UNIQUE_NAME] --include-aliases
         {
           "comment": "Managed by the bundle",
        -  "aliases": [
        -    {
        -      "alias_name": "test",
        -      "version_num": 1
        -    },
        -    {
        -      "alias_name": "staging",
        -      "version_num": 2
        -    }
        -  ]
        +  "aliases": []
         }
         
         === Redeploy is a no-op

latest (v1.22.1): same output as main (66fce77)

TestAccept/bundle/resources/registered_models/aliases/DMS=/READPLAN=: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=READP372438765/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.22.1):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=READP2660973801/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/registered_models/aliases/DMS=/READPLAN=1: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=READP937362522/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.22.1):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=READP3864069930/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (273 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/registered_models/aliases/DMS=true/READPLAN=: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=trueR1123474020/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (273 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.22.1):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=trueR1688403788/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/registered_models/aliases/DMS=true/READPLAN=1: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=trueR4114246664/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.22.1):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliasesDMS=trueR431708713/002/output.txt
        @@ -29,22 +29,7 @@
         
         === No aliases section: 'champion' is skipped as unmanaged, not drift
         >>> plan_aliases
        -{
        -  "aliases": {
        -    "action": "skip",
        -    "reason": "unmanaged",
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
        -    ]
        -  }
        -}
        +{}
         
         >>> [CLI] bundle plan
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        @@ -63,49 +48,7 @@
                 "alias_name": "challenger",
                 "version_num": 1
               }
        -    ],
        -    "remote": [
        -      {
        -        "alias_name": "champion",
        -        "catalog_name": "main",
        -        "id": "[UUID]",
        -        "model_name": "model-aliases-[UNIQUE_NAME]",
        -        "schema_name": "default",
        -        "version_num": 1
        -      }
             ]
        -  },
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "new": {
        -      "alias_name": "challenger",
        -      "version_num": 1
        -    }
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].version_num": {
        -    "action": "update",
        -    "new": 2,
        -    "remote": 1
           }
         }
         
        @@ -114,35 +56,27 @@
           "method": "PATCH",
           "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]",
           "body": {
        +    "aliases": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
             "catalog_name": "main",
             "comment": "",
             "name": "model-aliases-[UNIQUE_NAME]",
             "schema_name": "default"
           }
         }
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/champion",
        -  "body": {
        -    "version_num": 2
        -  }
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.1/unity-catalog/models/main.default.model-aliases-[UNIQUE_NAME]/aliases/challenger",
        -  "body": {
        -    "version_num": 1
        -  }
        -}
         
         >>> [CLI] registered-models get main.default.model-aliases-[UNIQUE_NAME] --include-aliases
         [
           {
             "alias_name": "champion",
        -    "version_num": 2
        -  },
        -  {
        -    "alias_name": "challenger",
             "version_num": 1
           }
         ]
        @@ -150,45 +73,29 @@
         === Redeploy is a no-op: the fields the backend fills in on each alias are skipped as output_only
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger'].catalog_name": {
        +  "aliases": {
             "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='challenger'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='challenger'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='challenger'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        -  },
        -  "aliases[alias_name='champion'].catalog_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "main"
        -  },
        -  "aliases[alias_name='champion'].id": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "[UUID]"
        -  },
        -  "aliases[alias_name='champion'].model_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "model-aliases-[UNIQUE_NAME]"
        -  },
        -  "aliases[alias_name='champion'].schema_name": {
        -    "action": "skip",
        -    "reason": "output_only",
        -    "remote": "default"
        +    "reason": "input_only",
        +    "old": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ],
        +    "new": [
        +      {
        +        "alias_name": "champion",
        +        "version_num": 2
        +      },
        +      {
        +        "alias_name": "challenger",
        +        "version_num": 1
        +      }
        +    ]
           }
         }
         
        @@ -211,248 +117,33 @@
         
         >>> plan_aliases
         {
        -  "aliases[alias_name='challenger']": {
        -    "action": "update",
        -    "old": {
        -      "alias_name": "challenger",
        -      "version_num": 1
... (272 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/resources/registered_models/aliases_converge/DMS=: branch ✅ | main (66fce77) ❌ | latest (v1.22.1) ❌

main (66fce77):

acceptance_test.go:1307: Diff:
        --- bundle/resources/registered_models/aliases_converge/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsaliases_convergeD2524811609/002/output.txt
        @@ -4,59 +4,12 @@
         === Initial deployment with aliases set: the model is created, but has no version 1 for the alias yet
         >>> musterr [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default/files...
        -Error: cannot create resources.registered_models.my_registered_model: waiting after creating id=main.default.my-registered-model-aliases-[UNIQUE_NAME]: Model version 1 of registered model main.default.my-registered-model-aliases-[UNIQUE_NAME] does not exist. (404 RESOURCE_DOES_NOT_EXIST)
        -
        -Endpoint: PUT [DATABRICKS_URL]/api/2.1/unity-catalog/models/main.default.my-registered-model-aliases-[UNIQUE_NAME]/aliases/champion
        -HTTP Status: 404 Not Found
        -API error_code: RESOURCE_DOES_NOT_EXIST
        -API message: Model version 1 of registered model main.default.my-registered-model-aliases-[UNIQUE_NAME] does not exist.
        -
        +Created registered_models.my_registered_model
         Files: 2 uploaded, 0 deleted
        +Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
         
        -=== The model is tracked: the next plan retries the alias as an update instead of creating the model again
        ->>> [CLI] bundle plan
        -update registered_models.my_registered_model
        +Unexpected success
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        -
        -=== A training run registers version 1, and the deploy sets the alias
        ->>> register_model_version main.default.my-registered-model-aliases-[UNIQUE_NAME]
        -1
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default/files...
        -Updated registered_models.my_registered_model
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> [CLI] registered-models get main.default.my-registered-model-aliases-[UNIQUE_NAME] --include-aliases
        -[
        -  {
        -    "alias_name": "champion",
        -    "version_num": 1
        -  }
        -]
        -
        -=== Plan is a no-op: the fields the backend fills in on the alias do not drift
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
        -=== Edit the comment: an in-place update, not a recreate
        ->>> [CLI] bundle plan
        -update registered_models.my_registered_model
        -
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default/files...
        -Updated registered_models.my_registered_model
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        -=== Re-plan after the edit converges: no further changes
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.registered_models.my_registered_model
        @@ -64,3 +14,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default
         
         Destroy: 1 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1126: Test produced unexpected files:
        .databricks/.gitignore
        .databricks/bundle/default/deployment.json

latest (v1.22.1): same output as main (66fce77)

1 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: a8b4bdd

Run: 39796609545

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 18 4:11
✅​ aws-windows-latest-4core-16gb 283 16 3:18
✅​ azure linux-2core-8gb 280 18 4:03
✅​ azure-windows-latest-4core-16gb 282 16 3:16
✅​ gcp linux-2core-8gb 281 18 4:07
✅​ gcp-windows-latest-4core-16gb 283 16 5:27
Top 3 slowest tests (at least 2 minutes):
duration env testname
5:20 gcp-windows-latest-4core-16gb TestAccept
3:10 azure-windows-latest-4core-16gb TestAccept
3:02 aws-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

registered_model aliases in bundle config not applied to Unity Catalog despite successful deploy

2 participants