{"record":{"id":"c50a7d327e33f660","repo":"mlflow/mlflow","slug":"databricks-trace-artifact-repositories-do-not-yet","errorCode":null,"errorMessage":"Databricks trace artifact repositories do not yet support ARCHIVE_REPO trace payloads.","messagePattern":"Databricks trace artifact repositories do not yet support ARCHIVE_REPO trace payloads\\.","errorType":"exception","errorClass":"MlflowNotImplementedException","httpStatus":null,"severity":"error","filePath":"mlflow/store/artifact/databricks_artifact_repo.py","lineNumber":349,"sourceCode":"        headers = self._extract_headers_from_credentials(cred.headers)\n        try:\n            return self._download_trace_file_to_path(signed_uri, dst_path, headers)\n        except requests.HTTPError as e:\n            if e.response.status_code == 404:\n                raise MlflowTraceDataNotFound(request_id=self.resource.id) from e\n            raise\n\n    def download_trace_data(self) -> dict[str, Any]:\n        with tempfile.TemporaryDirectory() as temp_dir:\n            dst = Path(temp_dir, \"traces.json\")\n            self.download_trace_data_to_file(dst)\n            try:\n                return json.loads(dst.read_text(encoding=\"utf-8\"))\n            except json.JSONDecodeError as e:\n                raise MlflowTraceDataCorrupted(request_id=self.resource.id) from e\n\n    def download_archived_trace_data(self) -> TraceData:\n        raise MlflowNotImplementedException(\n            \"Databricks trace artifact repositories do not yet support ARCHIVE_REPO trace payloads.\"\n        )\n\n    def upload_trace_data(self, trace_data: str) -> None:\n        cred = self._get_upload_trace_data_cred_info()\n        with write_local_temp_trace_data_file(trace_data) as temp_file:\n            # Upload trace data synchronously to avoid ThreadPoolExecutor deadlock during Python\n            # interpreter shutdown, which causes \"cannot schedule new futures after shutdown\" error.\n            if cred.type == ArtifactCredentialType.AZURE_ADLS_GEN2_SAS_URI:\n                self._azure_adls_gen2_upload_file(\n                    credentials=cred,\n                    local_file=temp_file,\n                    artifact_file_path=None,\n                    get_credentials=lambda artifact_paths: [\n                        self._get_upload_trace_data_cred_info()\n                    ],\n                    is_sync=True,\n                )","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/store/artifact/databricks_artifact_repo.py#L331-L367","documentation":"Databricks trace artifact repositories do not implement download_archived_trace_data; calling it unconditionally raises MlflowNotImplementedException with this message. ARCHIVE_REPO trace payloads (archived traces) are not supported for this repository type yet. It is an intentional capability gap, not a data problem.","triggerScenarios":"Calling download_archived_trace_data() on a DatabricksArtifactRepository instance, typically via generic trace-retrieval code paths that assume archive support.","commonSituations":"Generic tooling dispatching on repo type without checking whether archive download is supported; accessing traces moved to an archive repository.","solutions":["Use download_trace_data() for non-archived traces instead","Check the trace's repo type/lifecycle_stage before calling archive methods","Implement archive access via Databricks APIs directly if needed","Upgrade MLflow — support may be added in later versions"],"exampleFix":"// before\ndata = repo.download_archived_trace_data()\n// after\nfrom mlflow.exceptions import MlflowException\ntry:\n    data = repo.download_archived_trace_data()\nexcept MlflowException:\n    data = repo.download_trace_data()","handlingStrategy":"try-catch","validationCode":"# Feature-detect archive support before calling\ndef supports_archive_download(repo) -> bool:\n    cls = type(repo)\n    return cls.download_archived_trace_data is not\n        __import__('mlflow.store.artifact.databricks_artifact_repo', fromlist=['x']).DatabricksArtifactRepository.download_archived_trace_data","typeGuard":null,"tryCatchPattern":"from mlflow.exceptions import MlflowException\ntry:\n    data = repo.download_archived_trace_data()\nexcept MlflowException as e:\n    if 'ARCHIVE_REPO' in str(e):\n        data = None  # archive download unsupported for this repo\n    else:\n        raise","preventionTips":["Check the trace's lifecycle_stage/repo type before archive operations","Guard generic trace tooling with capability detection","Track MLflow release notes for ARCHIVE_REPO support in Databricks repos"],"tags":["databricks","tracing","not-implemented","archive"],"backgroundTag":"not-implemented","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}