Hui Zheng
06/27/2020, 1:24 AMFile "build_and_deploy.py", line 48, in <module>
env_vars=deployment_vars
File "/Users/huizheng/.local/share/virtualenvs/data-platform-W017i1KI/lib/python3.7/site-packages/prefect/core/flow.py", line 1277, in deploy
version_group_id=version_group_id,
File "/Users/huizheng/.local/share/virtualenvs/data-platform-W017i1KI/lib/python3.7/site-packages/prefect/client/client.py", line 577, in deploy
versionGroupId=version_group_id,
File "/Users/huizheng/.local/share/virtualenvs/data-platform-W017i1KI/lib/python3.7/site-packages/prefect/client/client.py", line 222, in graphql
raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'path': ['createFlowFromCompressedString'], 'message': '1 validation error for FlowSchema\nschedule -> clocks -> 0 -> parameter_defaults\n field required (type=value_error.missing)', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
I am using prefect version 0.7.3
(yes, it’s old, but have to stay with it for another month). the error was thrown at this line of code
dbt_flow.deploy(
'{}'.format(env),
python_dependencies=[
'google-cloud-firestore', 'python-dotenv', 'google-cloud-storage', 'environs'],
files={
path.abspath('./prefect_cloud_deployment/{}/gcp-scheduler-key.json'.format(env)): '/home',
},
registry_url='<http://us.gcr.io/semios-dbt/scheduler|us.gcr.io/semios-dbt/scheduler>',
env_vars=deployment_vars
The code before that line which might related to this error
# Flow auto-schedule
start_time = datetime.now()
start_time = start_time.replace(hour=(start_time.hour), minute=10, second=0, microsecond=0)
hourly_schedule = Schedule(clocks=[IntervalClock(interval=timedelta(minutes=60), start_date=start_time)])
dbt_flow.schedule = hourly_schedule
Jeremiah
06/27/2020, 1:42 AMChris White
06/27/2020, 2:12 AMHui Zheng
06/28/2020, 11:42 PM