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
def get(self, workspace_id: int) -> Workspace:
"""Get a workspace.
Gets information including status for a Databricks workspace, specified by ID. In the response, the
`workspace_status` field indicates the current status. After initial workspace creation (which is
asynchronous), make repeated `GET` requests with the workspace ID and check its status. The workspace
becomes available when the status changes to `RUNNING`.
For information about how to create a new workspace with this API **including error handling**, see
[Create a new workspace using the Account API].
This operation is available only if your account is on the E2 version of the platform or on a select
custom plan that allows multiple workspaces per account.
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
:param workspace_id: int
Workspace ID.
:returns: :class:`Workspace`
"""
headers = {'Accept': 'application/json', }
res = self._api.do('GET',
f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}',
headers=headers)
return Workspace.from_dict(res)
def list(self) -> Iterator[Workspace]:
"""Get all workspaces.
Gets a list of all workspaces associated with an account, specified by ID.
This operation is available only if your account is on the E2 version of the platform or on a select
custom plan that allows multiple workspaces per account.
:returns: Iterator over :class:`Workspace`
"""
headers = {'Accept': 'application/json', }
res = self._api.do('GET', f'/api/2.0/accounts/{self._api.account_id}/workspaces', headers=headers)
return [Workspace.from_dict(v) for v in res]
Expected behavior
Update the endpoint or catch the JSON decode error to let the user know that this is no longer available on Azure.
Is it a regression?
This worked a few days ago. SDK didn't change, but the endpoints are depreciated.
Debug Logs
File "C:\Users\thxsg\.databricks\labs\ucx\lib\src\databricks\labs\ucx\account\metastores.py", line 41, in assign_metastore
metastore_choices = self._get_all_metastores(self._get_region(workspace_id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thxsg\.databricks\labs\ucx\lib\src\databricks\labs\ucx\account\metastores.py", line 58, in _get_region
workspace = self._ac.workspaces.get(workspace_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thxsg\.databricks\labs\ucx\state\venv\Lib\site-packages\databricks\sdk\service\provisioning.py", line 2626, in get
res = self._api.do('GET',
^^^^^^^^^^^^^^^^^^^
File "C:\Users\thxsg\.databricks\labs\ucx\state\venv\Lib\site-packages\databricks\sdk\core.py", line 171, in do
jsonResponse = response.json()
^^^^^^^^^^^^^^^
File "C:\Users\thxsg\.databricks\labs\ucx\state\venv\Lib\site-packages\requests\models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Other Information
OS: Windows
Version: 24H2
Additional context
Causing multiple issues working with the UCX tool.
The text was updated successfully, but these errors were encountered:
Description
Endpoints for account > provisioning > workspaces are no longer supported for Azure (Only for AWS and GCP). More specifically:
Reproduction
Expected behavior
Update the endpoint or catch the JSON decode error to let the user know that this is no longer available on Azure.
Is it a regression?
This worked a few days ago. SDK didn't change, but the endpoints are depreciated.
Debug Logs
Other Information
Additional context
Causing multiple issues working with the UCX tool.
The text was updated successfully, but these errors were encountered: