{"record":{"id":"c685372816c18bc8","repo":"mlflow/mlflow","slug":"move-aborted-the-following-resource-type-alread","errorCode":null,"errorMessage":"Move aborted: the following {resource_type} already exist in workspace {target_workspace!r} and would conflict: {formatted}\\nRename or remove the conflicting resources in the target workspace, then retry.","messagePattern":"Move aborted: the following (.+?) already exist in workspace (.+?) and would conflict: (.+?)\\\\nRename or remove the conflicting resources in the target workspace, then retry\\.","errorType":"console","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"mlflow/store/db/workspace_move.py","lineNumber":342,"sourceCode":"            matched = {row[0] for row in conn.execute(name_filter).fetchall()}\n        elif names:\n            matched = _resolve_names(conn, spec, source_workspace, names)\n            name_filter = list(matched)\n        else:\n            matched = _resolve_names(conn, spec, source_workspace)\n            name_filter = None\n\n        if not matched:\n            return MoveResult(names=[], row_count=0)\n\n        if conflicts := _find_conflicts(\n            conn, spec, source_workspace, target_workspace, name_filter\n        ):\n            formatted = format_truncated_list(\n                [repr(name) for name in conflicts],\n                max_rows=None if verbose else 10,\n            )\n            raise RuntimeError(\n                f\"Move aborted: the following {resource_type} already exist \"\n                f\"in workspace {target_workspace!r} and would conflict: \"\n                f\"{formatted}\\n\"\n                \"Rename or remove the conflicting resources in the target \"\n                \"workspace, then retry.\"\n            )\n\n        table = spec.table\n        name_col = table.c[spec.name_column]\n\n        def _filtered(stmt, col, _nf=name_filter):\n            return stmt.where(col.in_(_nf)) if _nf is not None else stmt\n\n        row_count = conn.execute(\n            _filtered(\n                sa\n                .select(sa.func.count())\n                .select_from(table)","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/store/db/workspace_move.py#L324-L360","documentation":"Before moving resources between workspaces, the command checks whether resources with the same identifying name/key already exist in the target workspace. If any would collide, the entire move is aborted with this RuntimeError listing the conflicting names (up to 10 unless verbose). This is a safety check: proceeding would create duplicates or violate uniqueness constraints.","triggerScenarios":"Running move_resources where an experiment, model, or other target resource in the source workspace has the same name as one already present in the target workspace. Detected by _assert_no_workspace_conflicts via get_workspace_table reflection.","commonSituations":"Re-running a partially completed or previously failed move; merging two workspaces that were set up independently with same-named experiments; CI re-executing a migration idempotently.","solutions":["Rename or delete the conflicting resources in the target workspace, then retry the move.","Run with --verbose to see the full conflict list if it was truncated at 10 rows.","If the target copies are stale, drop them so the move can recreate/move the source versions."],"exampleFix":"# before\nmlflow workspace move --source ws1 --target prod  # fails: experiment 'churn-v2' exists\n# after\nmlflow experiments rename --experiment-name churn-v2 --new-name churn-v2-imported  # in target\nmlflow workspace move --source ws1 --target prod","handlingStrategy":"validation","validationCode":"existing = {e.name for e in mlflow.search_experiments(view_type=ViewType.ALL)}\nconflicts = desired_names & existing\nif conflicts:\n    print(f\"Resolve before moving: {conflicts}\")","typeGuard":null,"tryCatchPattern":"try:\n    move_resources(...)\nexcept RuntimeError as e:\n    if \"would conflict\" in str(e):\n        print(e)  # lists conflicting names; rename/delete in target, then retry\n    else:\n        raise","preventionTips":["Pre-flight: list names in source and target workspaces and diff them","Make moves idempotent by cleaning partial results before retrying","Use --verbose to get the complete conflict list"],"tags":["workspace","migration","conflict","database"],"backgroundTag":"duplicate-resource-conflict","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}