Skip to content

Commit

Permalink
Fixed integration testing with random product names (#1074)
Browse files Browse the repository at this point in the history
In the latest update to the `ucx` framework, the `trigger` function in
`tasks.py` has been modified to include a new argument,
`install_folder`, in the `Installation` object. This object is now
created within the `trigger` function and is passed to the `run_task`
function. The `install_folder` is calculated by obtaining the parent
directory of the `config_path` variable, converting it to a POSIX-style
path, and removing the leading "/Workspace" prefix. This change ensures
that the `run_task` function receives the correct installation folder
for the `ucx` framework, enhancing the overall functionality and
accuracy of the `ucx` framework.
  • Loading branch information
FastLee authored Mar 20, 2024
1 parent e97d2ef commit f4d5311
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/databricks/labs/ucx/framework/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def trigger(*argv):
cfg = Installation.load_local(WorkspaceConfig, config_path)
sql_backend = RuntimeBackend(debug_truncate_bytes=cfg.connect.debug_truncate_bytes)
workspace_client = WorkspaceClient(config=cfg.connect, product='ucx', product_version=__version__)
installation = Installation.current(workspace_client, "ucx")
install_folder = config_path.parent.as_posix().removeprefix("/Workspace")
installation = Installation(workspace_client, "ucx", install_folder=install_folder)

run_task(args, config_path.parent, cfg, workspace_client, sql_backend, installation)

0 comments on commit f4d5311

Please sign in to comment.