-
Notifications
You must be signed in to change notification settings - Fork 101
aws integration test fails test_logs_are_available - python error on replace #554
Copy link
Copy link
Closed
Description
git clone ...
export TEST_....
make integrationfails with what looks like python error FAILED tests/integration/test_installation.py::test_logs_are_available - TypeError: replace() should be called on dataclass instances
tests/integration/test_installation.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/databricks/labs/ucx/install.py:124: in run_for_config
workspace_installer._run_configured()
src/databricks/labs/ucx/install.py:108: in _run_configured
self._create_jobs()
src/databricks/labs/ucx/install.py:351: in _create_jobs
settings = self._job_settings(step_name, remote_wheel)
src/databricks/labs/ucx/install.py:511: in _job_settings
"job_clusters": self._job_clusters({t.job_cluster for t in tasks}),
src/databricks/labs/ucx/install.py:620: in _job_clusters
aws_attributes = replace(spec.aws_attributes, instance_profile_arn=self._config.instance_profile)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = None, changes = {'instance_profile_arn': None}
def replace(obj, /, **changes):
"""Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@dataclass(frozen=True)
class C:
x: int
y: int
c = C(1, 2)
c1 = replace(c, x=3)
assert c1.x == 3 and c1.y == 2
"""
# We're going to mutate 'changes', but that's okay because it's a
# new dict, even if called with 'replace(obj, **my_changes)'.
if not _is_dataclass_instance(obj):
> raise TypeError("replace() should be called on dataclass instances")
E TypeError: replace() should be called on dataclass instances
../../.pyenv/versions/3.10.10/lib/python3.10/dataclasses.py:1424: TypeError
--------------------------------------- Captured log call ----------------------------------------
INFO databricks.labs.ucx.install:install.py:117 Installing UCX v0.5.0 on https://uc-demo.cloud.databricks.com
INFO databricks.labs.ucx.install:install.py:119 Installing UCX v0.4.1+3120231105204600 on https://uc-demo.cloud.databricks.com
DEBUG databricks.labs.ucx.install:install.py:334 Creating install folder: /Users/[email protected]/.2M2l
INFO databricks.labs.ucx.install:install.py:338 Creating configuration file: /Users/[email protected]/.2M2l/config.yml
INFO databricks.labs.ucx.install:install.py:151 Creating dashboards...
DEBUG databricks.labs.ucx.framework.dashboards:dashboards.py:111 Reading step folder /Users/douglas.moore/development/ucx/src/databricks/labs/ucx/queries/assessment...
DEBUG databricks.labs.ucx.framework.dashboards:dashboards.py:115 Reading dashboard folder /Users/douglas.moore/development/ucx/src/databricks/labs/ucx/queries/assessment/azure...
INFO databricks.labs.ucx.framework.dashboards:dashboards.py:120 Creating dashboard [2M2L][douglas.moore+UC] UCX Assessment (Azure)...
DEBUG databricks.labs.ucx.framework.dashboards:dashboards.py:115 Reading dashboard folder /Users/douglas.moore/development/ucx/src/databricks/labs/ucx/queries/assessment/main...
INFO databricks.labs.ucx.framework.dashboards:dashboards.py:120 Creating dashboard [2M2L][douglas.moore+UC] UCX Assessment (Main)...
DEBUG databricks.labs.ucx.install:install.py:342 Creating jobs from tasks in main
DEBUG databricks.labs.ucx.install:install.py:696 Building wheel for /var/folders/d6/5qdmg6pn5kgbnnjcgpg0lxwr0000gp/T/tmp8a3swczp/working-copy in /var/folders/d6/5qdmg6pn5kgbnnjcgpg0lxwr0000gp/T/tmp8a3swczp
INFO databricks.labs.ucx.install:install.py:490 Uploading wheel to dbfs:/Users/[email protected]/.2M2l/wheels/databricks_labs_ucx-0.4.1+3120231105204623-py3-none-any.whl
INFO databricks.labs.ucx.install:install.py:494 Uploading wheel to /Workspace/Users/[email protected]/.2M2l/wheels/databricks_labs_ucx-0.4.1+3120231105204623-py3-none-any.whl
DEBUG databricks.labs.ucx.install:install.py:737 Fetching all jobs to determine already deployed steps for app=2m2l_douglas_moore_uc
DEBUG databricks.labs.ucx.install:install.py:530 Created runner notebook: https://uc-demo.cloud.databricks.com/#workspace/Users/[email protected]/.2M2l/wheels/wheel-test-runner-0.4.1+3120231105204628.py
==================================== short test summary info =====================================
FAILED tests/integration/test_installation.py::test_logs_are_available - TypeError: replace() should be called on dataclass instances
=============================== 1 failed, 264 deselected in 29.47s ===============================
Reactions are currently unavailable