Skip to content
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

Acceptance failure: test_prepare_environment #565

Closed
nfx opened this issue Nov 8, 2023 · 0 comments · Fixed by #584
Closed

Acceptance failure: test_prepare_environment #565

nfx opened this issue Nov 8, 2023 · 0 comments · Fixed by #584

Comments

@nfx
Copy link
Collaborator

nfx commented Nov 8, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant