Hi, We are getting submission failed error when we...
# prefect-cloud
m
Hi, We are getting submission failed error when we try to run the flow. The flow is auto scheduled and worked fine yesterday. There is no change in the Prefect version as well Submission failed. ValidationError: 8 validation errors for DeploymentResponse schedule -> interval field required (type=value_error.missing) schedule -> timezone argument of type 'function' is not iterable (type=type_error) schedule -> cron extra fields not permitted (type=value_error.extra) schedule -> day_or extra fields not permitted (type=value_error.extra) schedule -> timezone argument of type 'function' is not iterable (type=type_error) schedule -> rrule field required (type=value_error.missing) schedule -> cron extra fields not permitted (type=value_error.extra) schedule -> day_or extra fields not permitted (type=value_error.extra)
n
hi @Milly Gupta - we've seen a couple others with this error and we're trying to figure out the cause here. would you mind sharing your
prefect version
output from where the failure occurs and the whole stack trace from the failure if possible?
m
Thanks Nate.
Copy code
13:59:51.931 | INFO    | prefect.agent - Submitting flow run '9d977f03-fafd-495c-9ce3-c86ba8627208'
13:59:52.472 | ERROR   | prefect.agent - Failed to get infrastructure for flow run '9d977f03-fafd-495c-9ce3-c86ba8627208'.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/prefect/agent.py", line 450, in submit_run
    doc_dict["data"] = infra_dict
  File "/usr/local/lib/python3.10/dist-packages/prefect/agent.py", line 389, in get_infrastructure
    await self._mark_flow_run_as_cancelled(flow_run)
  File "/usr/local/lib/python3.10/dist-packages/prefect/client/orchestration.py", line 1547, in read_deployment
    for field in ["work_pool_name", "work_queue_name"]
  File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 8 validation errors for DeploymentResponse
schedule -> interval
  field required (type=value_error.missing)
schedule -> timezone
  argument of type 'function' is not iterable (type=type_error)
schedule -> cron
  extra fields not permitted (type=value_error.extra)
schedule -> day_or
  extra fields not permitted (type=value_error.extra)
schedule -> timezone
  argument of type 'function' is not iterable (type=type_error)
schedule -> rrule
  field required (type=value_error.missing)
schedule -> cron
  extra fields not permitted (type=value_error.extra)
schedule -> day_or
  extra fields not permitted (type=value_error.extra)
We have pinned prefect-2.10.21 as we had some library mismatch issue.
n
thank you for that! would you be able to share the non-sensitive output of
prefect deployment inspect <your-deployment-name>
?
m
{
'id': 'df937f86-0f83-4ef4-8066-c60c648a9bde', 'created': '2023-12-19T110345.972267+00:00', 'updated': '2023-12-19T142242.617229+00:00', 'name': 'Deployment-PR6204', 'version': '244b8c74166e394516d6e81e767ef67d64b23445', 'description': None, 'flow_id': 'f7352d38-d070-431c-8ac7-b1749a6ba560', 'schedule': {'cron': '15,30,45,0 8-20 * * *', 'timezone': 'Europe/London', 'day_or': True}, 'is_schedule_active': True, 'infra_overrides': {}, 'parameters': { 'build_mode': 'feature', 'max_layers': 1, 'pipeline_mode': 'transform', 'max_batch_size': 1, 'model_type_ids': [35, 36, 37], 'pipeline_sequence': 'PREFECT_FLOW_DEPLOY', 'subscription_prefix': 'devtest', 'model_sql_environment': 'DEV', 'environment_identifier': 'PR6204' }, 'tags': ['244b8c74166e394516d6e81e767ef67d64b23445', 'PR6204', 'feature'], 'work_queue_name': 'PR6204', 'last_polled': '2023-12-19T145220.802069+00:00', 'parameter_openapi_schema': { 'type': 'object', 'title': 'Parameters', 'required': [ 'subscription_prefix', 'environment_identifier', 'build_mode', 'pipeline_mode', 'pipeline_sequence', 'model_sql_environment', 'model_type_ids', 'max_layers', 'max_batch_size' ], 'properties': { 'build_mode': {'type': 'string', 'title': 'build_mode', 'position': 2}, 'max_layers': {'type': 'integer', 'title': 'max_layers', 'position': 7}, 'pipeline_mode': {'type': 'string', 'title': 'pipeline_mode', 'position': 3}, 'max_batch_size': {'type': 'integer', 'title': 'max_batch_size', 'position': 8}, 'model_type_ids': {'type': 'array', 'items': {'type': 'integer'}, 'title': 'model_type_ids', 'position': 6}, 'pipeline_sequence': {'type': 'string', 'title': 'pipeline_sequence', 'position': 4}, 'subscription_prefix': {'type': 'string', 'title': 'subscription_prefix', 'position': 0}, 'model_sql_environment': {'type': 'string', 'title': 'model_sql_environment', 'position': 5}, 'environment_identifier': {'type': 'string', 'title': 'environment_identifier', 'position': 1} } }, 'path': 'transform/python/cdpprefect/flows/portfolio_rollup', 'pull_steps': [], 'entrypoint': 'transform/python/cdpprefect/flows/portfolio_rollup/portfolio_rollup_flow.py:portfolio_rollup_flow', 'manifest_path': None, 'storage_document_id': None, 'infrastructure_document_id': 'e2bdfd8a-c190-4331-b1bb-628e7e3900ab', 'created_by': {'id': 'bd4c7fa3-01f0-4677-b37c-f4030e6d0834', 'type': 'BOT', 'display_value': 'svcreilsdsdevtestprefectado'}, 'updated_by': {'id': 'bd4c7fa3-01f0-4677-b37c-f4030e6d0834', 'type': 'BOT', 'display_value': 'svcreilsdsdevtestprefectado'}, 'work_pool_name': 'default-agent-pool', 'status': 'READY', 'enforce_parameter_schema': False, 'infrastructure': {'type': 'process', 'env': {}, 'labels': {}, 'name': None, 'command': None, 'stream_output': True, 'working_dir': '.', 'block_type_slug': 'process'}, 'automations': [] }
j
@Milly Gupta does this error occur 100% of the time or is intermittent?
m
It's happening every time. We are able to reproduce this in Dev environment too.
🙏 1
Above is the log from DEV env.
I am not sure if it's only specific to schedules
n
hey @Milly Gupta - could you try pinning this dependency?
Copy code
pendulum >= 2.1.2, < 3.0.0
m
Thanks @Nate. Now we are hitting this issue https://github.com/PrefectHQ/prefect/issues/11295
As suggested, we have updated
prefect >= 2.14.11 and pendulum >= 2.1.2, < 3.0.0
n
hi @Milly Gupta - sorry to hear you're hitting that issue. do you need to be setting
path
explicitly? i.e. can you just set your
entrypoint
for your deployments relative to the root of our storage block and leave your
path
unset?
m
Thanks Nate. Will give it a try.
Hi @Nate, we tried un-setting path but we are getting the below error state=Failed(message="Flow could not be retrieved from deployment. FileNotFoundError: [Errno 2] No such file or directory: '/azp/local/REILS-DataStrategy'", type=FAILED, result=None) state_type=StateType.FAILED state_name='Failed
Just for information we are using local storage.
n
hey @Milly Gupta would you be able to start a new thread with detail on what you're doing / what stack trace you're getting if this is an persistent issue for you?
👍 1