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
Currently Prefect doesn't support a list of inputs as a custom start command. This functionality is natively supported by Docker and ECS.
Example
Command: ['/bin/sh', '-c', 'python -m some.module', '&&', 'prefect flow-run execute']
If I pass the above start command list to a Prefect ECS work pool. I get the following error:
Stacktrace:
Failed to submit flow run '89015a3e-c72b-4e8c-af78-c90d7521eea5' to infrastructure.
Traceback (most recent call last):
File "/usr/local/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 "/usr/local/lib/python3.12/site-packages/prefect/workers/base.py", line 1105, in _get_configuration
configuration = await self.job_configuration.from_template_and_values(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/client/utilities.py", line 99, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect_aws/workers/ecs_worker.py", line 422, in from_template_and_values
return cls(**populated_configuration)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/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 ECSJobConfiguration
command
Input should be a valid string [type=string_type, input_value=['/bin/sh', '-c', 'python...efect flow-run execute'], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
I can't pass in the commands as a single string because Docker will only execute the first command in front of the &&. For example, python -m some.module && prefect flow-run execute will result in only python -m some.module being executed.
Version info
Version: 3.1.8
API version: 0.8.4
Python version: 3.11.11
Git commit: 53a83ebc
Built: Tue, Dec 17, 2024 10:20 AM
OS/Arch: linux/x86_64
Profile: ephemeral
Server type: ephemeral
Pydantic version: 2.9.2
Server:
Database: sqlite
SQLite version: 3.34.1
Integrations:
prefect-shell: 0.3.0
prefect-dask: 0.3.2
Additional context
No response
The text was updated successfully, but these errors were encountered:
Bug summary
Issue
Currently Prefect doesn't support a list of inputs as a custom start command. This functionality is natively supported by Docker and ECS.
Example
Command:
['/bin/sh', '-c', 'python -m some.module', '&&', 'prefect flow-run execute']
If I pass the above start command list to a Prefect ECS work pool. I get the following error:
Stacktrace:
I can't pass in the commands as a single string because Docker will only execute the first command in front of the
&&
. For example,python -m some.module && prefect flow-run execute
will result in onlypython -m some.module
being executed.Version info
Additional context
No response
The text was updated successfully, but these errors were encountered: