dbx
dbx copied to clipboard
MLFlow Error 409 when deploying --assets-only
Expected Behavior
Deploy Jobs with --assets-only option
Current Behavior
MLFlow API Request 409 Conflict
Steps to Reproduce (for bugs)
[dbx][2022-11-03 12:30:40.370] ð Deployment file is not provided, searching in the conf directory [dbx][2022-11-03 12:30:40.375] ð¡ Auto-discovery found deployment file conf/deployment.json [dbx][2022-11-03 12:30:40.376] ð Deployment file conf/deployment.json exists and will be used for deployment [dbx][2022-11-03 12:30:40.377] Starting new deployment for environment dev [dbx][2022-11-03 12:30:40.378] Using profile provided from the project file [dbx][2022-11-03 12:30:40.378] Found auth config from provider EnvironmentVariableConfigProvider, verifying it [dbx][2022-11-03 12:30:40.379] Found auth config from provider EnvironmentVariableConfigProvider, verification successful [dbx][2022-11-03 12:30:44.897] Since v0.7.0 environment configurations should be nested under environments section.
Please nest environment configurations under this section to avoid potential issues while using "build"
configuration directive.
[dbx][2022-11-03 12:30:44.899] No build logic defined in the deployment file. Default pip-based build logic will be used.
[dbx][2022-11-03 12:30:44.903] Usage of jobs keyword in deployment file is deprecated. Please use workflows instead (simply rename this section to workflows).
[dbx][2022-11-03 12:30:44.906] Workflows ['add-on-chanel-AT', 'add-on-chanel-PL', 'add-on-PL'] were selected for further operations
[dbx][2022-11-03 12:30:44.907] Following the provided build logic
[dbx][2022-11-03 12:30:44.908] ð Building a Python-based project
[dbx][2022-11-03 12:30:46.262] â
Python-based project build finished
[dbx][2022-11-03 12:30:46.264] Locating package file
[dbx][2022-11-03 12:30:46.265] Package file located in: dist/ds_recommenders-1.2.9-py3-none-any.whl
[dbx][2022-11-03 12:30:47.221] Starting the traversal process
[dbx][2022-11-03 12:30:47.222] Processing libraries for workflow add-on-chanel-AT
[dbx][2022-11-03 12:30:47.223] â
Processing libraries for workflow add-on-chanel-AT - done
[dbx][2022-11-03 12:30:47.224] Processing libraries for workflow add-on-chanel-PL
[dbx][2022-11-03 12:30:47.225] â
Processing libraries for workflow add-on-chanel-PL - done
[dbx][2022-11-03 12:30:47.225] Processing libraries for workflow add-on-PL
[dbx][2022-11-03 12:30:47.226] â
Processing libraries for workflow add-on-PL - done
[dbx][2022-11-03 12:30:47.227] ⬠Uploading local file src/jobs/add_on_products/add_on_chanel/chanel_AT.py
[dbx][2022-11-03 12:30:50.412] â
Uploading local file src/jobs/add_on_products/add_on_chanel/chanel_AT.py
[dbx][2022-11-03 12:30:50.414] ⬠Uploading local file src/jobs/add_on_products/add_on_chanel/chanel_AT.py
ââââââââââââââââââââââ Traceback (most recent call last) âââââââââââââââââââââââ®
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/dbx/comma â
â nds/deploy.py:157 in deploy â
â â
â 154 â â â â wf_manager = WorkflowDeploymentManager(api_client, ele â
â 155 â â â â wf_manager.apply() â
â 156 â â else: â
â â± 157 â â â adjuster.traverse(deployable_workflows) â
â 158 â â â if not _assets_only: â
â 159 â â â â wf_manager = WorkflowDeploymentManager(api_client, dep â
â 160 â â â â wf_manager.apply() â
â â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/dbx/api/a â
â djuster/adjuster.py:185 in traverse â
â â
â 182 â def traverse(self, workflows: Union[WorkflowList, List[str]]): â
â 183 â â dbx_echo("Starting the traversal process") â
â 184 â â self.property_adjuster.library_traverse(workflows, self.additi â
â â± 185 â â self.property_adjuster.file_traverse(workflows, self.file_adju â
â 186 â â self.property_adjuster.property_traverse(workflows) â
â 187 â â self.property_adjuster.cluster_policy_traverse(workflows) â
â 188 â â dbx_echo("Traversal process finished, all provided references â
â â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/dbx/api/a â
â djuster/adjuster.py:168 in file_traverse â
â â
â 165 â â for element, parent, index in self.traverse(workflows): â
â 166 â â â if isinstance(element, str): â
â 167 â â â â if element.startswith("file://") or element.startswith â
â â± 168 â â â â â file_adjuster.adjust_file_ref(element, parent, ind â
â 169 â
â 170 â
â 171 class Adjuster: â
â â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/dbx/api/a â
â djuster/mixins/file_reference.py:12 in adjust_file_ref â
â â
â 9 â â self._uploader = file_uploader â
â 10 â â
â 11 â def adjust_file_ref(self, element: str, parent: Any, index: Any): â
â â± 12 â â _uploaded = self._uploader.upload_and_provide_path(element) â
â 13 â â self.set_element_at_parent(_uploaded, parent, index) â
â 14 â
â â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/dbx/utils â
â /file_uploader.py:59 in upload_and_provide_path â
â â
â 56 â â â self._verify_fuse_support() â
â 57 â â â
â 58 â â dbx_echo(f":arrow_up: Uploading local file {local_file_path}") â
â â± 59 â â self.upload_file(local_file_path) â
â 60 â â dbx_echo(f":white_check_mark: Uploading local file {local_file â
â 61 â â return self._postprocess_path(local_file_path, as_fuse) â
â 62 â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mlflow/ut â
â ils/rest_utils.py:199 in http_request_safe â
â â
â 196 â Wrapper around http_request that also verifies that the reques â
â 197 â """ â
â 198 â response = http_request(host_creds=host_creds, endpoint=endpoint, â
â â± 199 â return verify_rest_response(response, endpoint) â
â 200 â
â 201 â
â 202 def verify_rest_response(response, endpoint): â
â â
â /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mlflow/ut â
â ils/rest_utils.py:212 in verify_rest_response â
â â
â 209 â â â â endpoint, â
â 210 â â â â response.status_code, â
â 211 â â â ) â
â â± 212 â â â raise MlflowException( â
â 213 â â â â "%s. Response body: '%s'" % (base_msg, response.text), â
â 214 â â â â error_code=get_error_code(response.status_code), â
â 215 â â â ) â
â°âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯
MlflowException: API request to endpoint
/dbfs/Shared/ds_recommenders/projects/ds_recommenders_experiments/8cfd06c9088742
8b97e6371f9225de5a/artifacts/src/jobs/add_on_products/add_on_chanel/chanel_AT.py
failed with error code 409 != 200. Response body: '
HTTP ERROR: 409
Problem accessing /dbfs/Shared/ds_recommenders/projects/ds_recommenders_experiments/8cfd06c9088742 8b97e6371f92[25](https://github.com/Flaconi/DS_Recommenders/actions/runs/3385675925/jobs/5624102075#step:11:26)de5a/artifacts/src/jobs/add_on_products/add_on_chanel/chanel_AT.py . Reason:
File already exists, cannot overwrite: '/Shared/ds_recommenders/projects/ds_recommenders_experiments/8cfd06c908874 [28](https://github.com/Flaconi/DS_Recommenders/actions/runs/3385675925/jobs/5624102075#step:11:29)b97e6[37](https://github.com/Flaconi/DS_Recommenders/actions/runs/3385675925/jobs/5624102075#step:11:38)1f[92](https://github.com/Flaconi/DS_Recommenders/actions/runs/3385675925/jobs/5624102075#step:11:93)25de5a/artifacts/src/jobs/add_on_products/add_on_chanel/chanel_AT.p y'
' Error: Process completed with exit code 1.
Context
Updated few jobs today using the latest dbx version, and at the jobless deployment cicd step I get the error above. MLFlow is only used to define a specific experiment path. No path related updates or changes here!
Your Environment
- dbx version used: 0.8.x
- Databricks Runtime version: 10.4 LTS (standard or ML)
- Python version: 3.8.11
hi @Stefanos-Arampatzis ,
could you please provide the section of the deployment file where this file is referencedsrc/jobs/add_on_products/add_on_chanel/chanel_AT.py?
hi @renardeinside here it is
"spark_python_task": {
"python_file": "file://src/jobs/add_on_products/add_on_chanel/chanel_AT.py",
...
}
hi @Stefanos-Arampatzis , unfortunately I cannot reproduce this issue in any of the local setups. Is it still an issue you're running into?
@renardeinside I just tried again to deploy and still get the same error. I now have the same behaviour in 3 different repos. I could enforce 0.7.6 to be installed, until we can find what's the issue. Thanks for the support
@renardeinside I tried the latest version, 0.8.4 and the error persists. It works with 0.7.6 so doesn't seem like a 4xx error on our side. Please let me know if you would need more context to debug.