Coder Social home page Coder Social logo

Comments (2)

mgyucht avatar mgyucht commented on June 12, 2024

@william-conti config.as_dict() returns a reference to the same config object. Modifying the host there modifies the config used by AccountClient. You can mitigate this by just using config.copy() instead of config.as_dict().

FYI: v0.19.0 will include AccountClient.get_workspace_client() which will handle this for you by making a deep copy of the config. With this update, you won't need to maintain your client_for() function anymore.

from databricks-sdk-py.

william-conti avatar william-conti commented on June 12, 2024

@mgyucht The fix still doesn't work:

    def test_broken(self):
        self._ac.groups.create(display_name="test_xxxx")
        for ws in self._ac.workspaces.list():
            ss = self._ac.get_workspace_client(ws)
            self._ac.groups.create(display_name="test_1xxxxx")

It yields the same below error:

../src/databricks/labs/ucx/account.py:108: in test_broken
    self._ac.groups.create(display_name="test_1xxxxx")
../../../Library/Application Support/hatch/env/virtual/databricks-labs-ucx/-POo8FxM/databricks-labs-ucx/lib/python3.11/site-packages/databricks/sdk/service/iam.py:1374: in create
    res = self._api.do('POST',
../../../Library/Application Support/hatch/env/virtual/databricks-labs-ucx/-POo8FxM/databricks-labs-ucx/lib/python3.11/site-packages/databricks/sdk/core.py:128: in do
    return retryable(self._perform)(method,
../../../Library/Application Support/hatch/env/virtual/databricks-labs-ucx/-POo8FxM/databricks-labs-ucx/lib/python3.11/site-packages/databricks/sdk/retries.py:54: in wrapper
    raise err
../../../Library/Application Support/hatch/env/virtual/databricks-labs-ucx/-POo8FxM/databricks-labs-ucx/lib/python3.11/site-packages/databricks/sdk/retries.py:33: in wrapper
    return func(*args, **kwargs)

E               databricks.sdk.errors.platform.NotFound: Endpoint not found for /2.0/accounts/None/scim/v2/Groups

../../../Library/Application Support/hatch/env/virtual/databricks-labs-ucx/-POo8FxM/databricks-labs-ucx/lib/python3.11/site-packages/databricks/sdk/core.py:221: NotFound

from databricks-sdk-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.