You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like Prefect's validation doesn't allow anonymous volumes. This is my volume configuration:
That throws the following Validation error:
19:30:34.753 | ERROR | prefect.flow_runs.worker - Failed to submit flow run 'e8d1029c-8368-4063-a208-8bf8305b7c6e' to infrastructure.
Traceback (most recent call last):
File "/Users/anzepecar/app/.venv/lib/python3.12/site-packages/prefect/workers/base.py", line 1007, in _submit_run_and_capture_errors
configuration = await self._get_configuration(flow_run)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/anzepecar/app/.venv/lib/python3.12/site-packages/prefect/workers/base.py", line 1105, in _get_configuration
configuration = await self.job_configuration.from_template_and_values(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/anzepecar/app/.venv/lib/python3.12/site-packages/prefect/client/utilities.py", line 99, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/anzepecar/app/.venv/lib/python3.12/site-packages/prefect/workers/base.py", line 188, in from_template_and_values
return cls(**populated_configuration)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/anzepecar/app/.venv/lib/python3.12/site-packages/pydantic/main.py", line 214, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for DockerWorkerJobConfiguration
volumes.1
Value error, Invalid volume string: '/opt/watchpointlabs/.venv' [type=value_error, input_value='/opt/watchpointlabs/.venv', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/value_error
19:30:34.769 | INFO | prefect.flow_runs.worker - Reported flow run 'e8d1029c-8368-4063-a208-8bf8305b7c6e' as crashed: Flow run could not be submitted to infrastructure:
1 validation error for DockerWorkerJobConfiguration
volumes.1
Is there a reason for not allowing anonymous volumes? They can be very useful useful for development purposes as also mentioned in the uv docs.
I'm happy to open a PR that fixes this, let me know!
Version info
Version: 3.1.15
API version: 0.8.4
Python version: 3.12.6
Git commit: 3ac3d548
Built: Thu, Jan 30, 2025 11:31 AM
OS/Arch: darwin/arm64
Profile: local
Server type: server
Pydantic version: 2.10.6
Integrations:
prefect-docker: 0.6.2
Additional context
No response
The text was updated successfully, but these errors were encountered:
hi @anze3db - thanks for raising this. i'm not aware of a reason we'd forbid anonymous volumes here, so I've opened #17022 to allow them! let me know what you think
Bug summary
It looks like Prefect's validation doesn't allow anonymous volumes. This is my volume configuration:
That throws the following Validation error:
Is there a reason for not allowing anonymous volumes? They can be very useful useful for development purposes as also mentioned in the uv docs.
I'm happy to open a PR that fixes this, let me know!
Version info
Additional context
No response
The text was updated successfully, but these errors were encountered: