nicholasnet
12/18/2023, 9:09 PMprefect agent start -p 'name'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 260, in coroutine_wrapper
return call()
^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 245, in __call__
return self.result()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 173, in result
return self.future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 218, in _run_async
result = await coro
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/deployment.py", line 1143, in build
deployment = await Deployment.build_from_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/deployments.py", line 783, in build_from_flow
await deployment.load()
File "/usr/local/lib/python3.11/site-packages/prefect/deployments.py", line 559, in load
deployment = await client.read_deployment_by_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/orchestration.py", line 1513, in read_deployment_by_name
return schemas.responses.DeploymentResponse.parse_obj(response.json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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)
An exception occurred.
Is anybody having this issue.Nate
12/18/2023, 11:52 PMprefect version
? it should not be a problem on newer versions of prefect. if possible, could you also share your pydantic version?nicholasnet
12/18/2023, 11:54 PMnicholasnet
12/18/2023, 11:55 PMNate
12/18/2023, 11:57 PMNate
12/18/2023, 11:57 PMnicholasnet
12/18/2023, 11:58 PMNate
12/18/2023, 11:58 PMprefect deployment inspect <your deployment>
for the one its failing to read there?nicholasnet
12/19/2023, 12:03 AMprefect deployments build flow/main.py:nightly_job --name $PROJECT-$BRANCH_NAME-nightly-job --infra-block kubernetes-job/$PROJECT-$BRANCH_NAME --pool '***-'$ENV --work-queue 'default' --tag 'nightly' --apply
Nate
12/19/2023, 12:04 AMWe are getting this error duringprefect agent start -p 'name'
nicholasnet
12/19/2023, 12:04 AMprefect deployments build flow/transform.py:transform_data --name $PROJECT-$BRANCH_NAME-transform --infra-block kubernetes-job/$PROJECT-$BRANCH_NAME --pool 'bidw-'$ENV --work-queue 'default' --tag 'nightly' --apply
and even previous one is working but in another branch (feature branch)nicholasnet
12/19/2023, 12:05 AMNate
12/19/2023, 12:09 AMnicholasnet
12/19/2023, 12:11 AMNate
12/19/2023, 12:13 AMprefect deployment inspect <your deployment>
from where it works in the feature branch?nicholasnet
12/19/2023, 12:13 AMcat
to see if I get that yaml ...running the build now.Nate
12/19/2023, 12:15 AMprefect deployment ls
and take the name and throw it into prefect deployment inspect <the name>
- not so much the deployment.yaml
nicholasnet
12/19/2023, 12:17 AMNate
12/19/2023, 12:19 AMnicholasnet
12/19/2023, 12:21 AM{
'id': '1e3efbc0-ea9a-4ad2-9659-4e7dc0dad160',
'created': '2023-08-02T12:45:50.422509+00:00',
'updated': '2023-12-15T23:45:09.364869+00:00',
'name': 'bidw-prefect-dev-nightly-job',
'version': 'da80f14ade0e799151f3e7e43717c42b',
'description': None,
'flow_id': 'dc75465d-b81a-4924-9fd6-0d3c091e6d88',
'schedule': {'cron': '30 21 * * 0-5', 'timezone': 'America/Denver', 'day_or': True},
'is_schedule_active': True,
'infra_overrides': {},
'parameters': {},
'tags': ['nightly'],
'work_queue_name': 'default',
'parameter_openapi_schema': {'type': 'object', 'title': 'Parameters', 'properties': {}},
'path': '/opt/prefect/flows',
'entrypoint': 'flow/main.py:nightly_job',
'manifest_path': None,
'storage_document_id': None,
'infrastructure_document_id': '00d8c8e3-6eaa-4f35-aca7-2cc840e536ed',
'created_by': {'id': 'f338de15-490c-4b81-833e-c075c907f8c3', 'type': 'BOT', 'display_value': 'non-prod-deployer'},
'updated_by': {'id': 'f338de15-490c-4b81-833e-c075c907f8c3', 'type': 'BOT', 'display_value': 'non-prod-deployer'},
'work_pool_name': 'bidw-dev',
'infrastructure': {
'type': 'kubernetes-job',
'env': {'ENV': 'dev', 'BRANCH_NAME': 'dev', 'ENVIRONMENT': 'dev'},
'labels': {},
'name': None,
'command': None,
'image': 'xxxxxx.dkr.ecr.us-west-2.amazonaws.com/bidw-prefect:dev-82f5b6008f31fc417a826c2ae34b79e3f11db735',
'namespace': 'dev-bidw',
'service_account_name': None,
'image_pull_policy': <KubernetesImagePullPolicy.ALWAYS: 'Always'>,
'cluster_config': None,
'job': {
'kind': 'Job',
'spec': {
'template': {
'spec': {
'volumes': [{'name': 'bidw-volume', 'persistentVolumeClaim': {'claimName': 'px-prefect-pvc'}}],
'containers': [
{
'env': [{'name': 'PREFECT_LOCAL_STORAGE_PATH', 'value': '/mnt/data'}],
'name': 'prefect-job',
'envFrom': [{'secretRef': {'name': 'bidw-cloud'}}],
'volumeMounts': [{'name': 'bidw-volume', 'mountPath': '/mnt/data'}]
}
],
'completions': 1,
'parallelism': 1,
'restartPolicy': 'Never'
}
}
},
'metadata': {'labels': {}},
'apiVersion': 'batch/v1'
},
'customizations': [],
'job_watch_timeout_seconds': 6000,
'pod_watch_timeout_seconds': 6000,
'stream_output': True,
'finished_job_ttl': 120,
'block_type_slug': 'kubernetes-job'
}
}
nicholasnet
12/19/2023, 12:33 AM{
'id': 'ebf53d34-13ca-47a5-b89b-474a70b84883',
'created': '2023-12-04T14:01:09.155540+00:00',
'updated': '2023-12-05T08:23:05.203376+00:00',
'name': 'bidw-prefect-feature-rv-bidw-23926-nightly-job',
'version': 'da80f14ade0e799151f3e7e43717c42b',
'description': None,
'flow_id': 'dc75465d-b81a-4924-9fd6-0d3c091e6d88',
'schedule': None,
'is_schedule_active': True,
'infra_overrides': {},
'parameters': {},
'tags': ['nightly'],
'work_queue_name': 'default',
'parameter_openapi_schema': {'type': 'object', 'title': 'Parameters', 'properties': {}},
'path': '/opt/prefect/flows',
'entrypoint': 'flow/main.py:nightly_job',
'manifest_path': None,
'storage_document_id': None,
'infrastructure_document_id': '1abaafdb-d0cb-475f-90aa-291952554ae2',
'created_by': {'id': 'f338de15-490c-4b81-833e-c075c907f8c3', 'type': 'BOT', 'display_value': 'non-prod-deployer'},
'updated_by': {'id': 'f338de15-490c-4b81-833e-c075c907f8c3', 'type': 'BOT', 'display_value': 'non-prod-deployer'},
'work_pool_name': 'bidw-dev',
'infrastructure': {
'type': 'kubernetes-job',
'env': {'ENV': 'dev', 'BRANCH_NAME': 'feature-rv-bidw-23926', 'ENVIRONMENT': 'dev'},
'labels': {},
'name': None,
'command': None,
'image': '<http://xxxxxxx.dkr.ecr.us-west-2.amazonaws.com/bidw-prefect:feature-rv-bidw-23926-289b4f3e48770adefc77585c383b6e4333287b41|xxxxxxx.dkr.ecr.us-west-2.amazonaws.com/bidw-prefect:feature-rv-bidw-23926-289b4f3e48770adefc77585c383b6e4333287b41>',
'namespace': 'dev-bidw',
'service_account_name': None,
'image_pull_policy': <KubernetesImagePullPolicy.ALWAYS: 'Always'>,
'cluster_config': None,
'job': {
'kind': 'Job',
'spec': {
'template': {
'spec': {
'volumes': [{'name': 'bidw-volume', 'persistentVolumeClaim': {'claimName': 'px-prefect-pvc'}}],
'containers': [
{
'env': [{'name': 'PREFECT_LOCAL_STORAGE_PATH', 'value': '/mnt/data'}],
'name': 'prefect-job',
'envFrom': [{'secretRef': {'name': 'bidw-cloud'}}],
'volumeMounts': [{'name': 'bidw-volume', 'mountPath': '/mnt/data'}]
}
],
'completions': 1,
'parallelism': 1,
'restartPolicy': 'Never'
}
}
},
'metadata': {'labels': {}},
'apiVersion': 'batch/v1'
},
'customizations': [],
'job_watch_timeout_seconds': 6000,
'pod_watch_timeout_seconds': 6000,
'stream_output': True,
'finished_job_ttl': 120,
'block_type_slug': 'kubernetes-job'
}
}
Nate
12/19/2023, 12:34 AMnicholasnet
12/19/2023, 12:35 AMNate
12/19/2023, 12:36 AMnicholasnet
12/19/2023, 12:37 AMnicholasnet
12/19/2023, 4:28 PMnicholasnet
12/19/2023, 4:28 PMnicholasnet
12/19/2023, 4:28 PMNate
12/19/2023, 4:32 PMnicholasnet
12/19/2023, 4:35 PMNate
12/19/2023, 4:37 PMnicholasnet
12/19/2023, 4:37 PMNate
12/19/2023, 5:56 PMpendulum >= 2.1.2, < 3.0.0
nicholasnet
12/19/2023, 5:56 PMnicholasnet
12/19/2023, 6:54 PMNate
12/19/2023, 7:37 PM