Thread
#prefect-community
    h

    Hui Zheng

    2 years ago
    Hello, Could someone help me with this error that I ran into when deploy flow into prefect-cloud?
    File "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

    Jeremiah

    2 years ago
    Hi @Hui Zheng! I know what you’re running into and it’s on Cloud’s side - we released a new validator which checks parameter defaults and older Prefect versions don’t have parameter defaults! We’ll fix it on our end ASAP.
    Apologies for the inconvenience, we always try to maintain backwards-compatibility but this slipped by.
    Chris White

    Chris White

    2 years ago
    Jeremiah just flagged this for me - we’re going to do a quick QA and hope to have a patch out within the hour 👍 will confirm back here when it’s out
    The fix has now been released, so you should be good to go Hui
    h

    Hui Zheng

    2 years ago
    that’s great. Thank you, @Jeremiah
    it works, thank you!