Skip to content

Acceptance failure: test_prepare_environment #565

@nfx

Description

@nfx

FAILED tests/integration/workspace_access/test_groups.py::test_prepare_environment - databricks.sdk.core.DatabricksError: None Group with id 132274931679577 not found.

___________________________ test_prepare_environment ___________________________

ws = <databricks.sdk.WorkspaceClient object at 0x7f012e6775b0>
make_ucx_group = <function make_ucx_group.<locals>.inner at 0x7f012e3880d0>

    def test_prepare_environment(ws, make_ucx_group):
        ws_group, acc_group = make_ucx_group()
    
        group_manager = GroupManager(ws, GroupsConfig(selected=[ws_group.display_name]))
        group_manager.prepare_groups_in_environment()
    
        group_migration_state = group_manager.migration_state
        for _info in group_migration_state.groups:
>           _ws = ws.groups.get(id=_info.workspace.id)

tests/integration/workspace_access/test_groups.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/share/hatch/env/virtual/databricks-labs-ucx/zIWoNST7/integration/lib/python3.10/site-packages/databricks/sdk/service/iam.py:1862: in get
    res = self._api.do('GET', f'/api/2.0/preview/scim/v2/Groups/{id}', headers=headers)
../../../.local/share/hatch/env/virtual/databricks-labs-ucx/zIWoNST7/integration/lib/python3.10/site-packages/databricks/sdk/core.py:1110: in do
    return retryable(self._perform)(method,
../../../.local/share/hatch/env/virtual/databricks-labs-ucx/zIWoNST7/integration/lib/python3.10/site-packages/databricks/sdk/retries.py:47: in wrapper
    raise err
../../../.local/share/hatch/env/virtual/databricks-labs-ucx/zIWoNST7/integration/lib/python3.10/site-packages/databricks/sdk/retries.py:29: in wrapper
    return func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <databricks.sdk.core.ApiClient object at 0x7f012e61ad10>, method = 'GET'
path = '/api/2.0/preview/scim/v2/Groups/132274931679577', query = None
headers = {'Accept': 'application/json', 'User-Agent': 'ucx/0.5.0 databricks-sdk-py/0.12.0 python/3.10.13 os/linux auth/azure-cli'}
body = None, raw = False, files = None, data = None

    def _perform(self,
                 method: str,
                 path: str,
                 query: dict = None,
                 headers: dict = None,
                 body: dict = None,
                 raw: bool = False,
                 files=None,
                 data=None):
        response = self._session.request(method,
                                         f"{self._cfg.host}{path}",
                                         params=self._fix_query_string(query),
                                         json=body,
                                         headers=headers,
                                         files=files,
                                         data=data,
                                         stream=raw)
        try:
            self._record_request_log(response, raw=raw or data is not None or files is not None)
            if not response.ok: # internally calls response.raise_for_status()
                # TODO: experiment with traceback pruning for better readability
                # See https://stackoverflow.com/a/58821552/277035
                payload = response.json()
>               raise self._make_nicer_error(response=response, **payload) from None
E               databricks.sdk.core.DatabricksError: None Group with id 132274931679577 not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions