PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.32k stars 1.5k forks source link

`prefect deploy` fails with a trigger using the `within` field #14309

Closed collincchoy closed 5 days ago

collincchoy commented 6 days ago

First check

Bug summary

I have a prefect.yaml containing a deployment definition with a trigger on it that successfully deploys with 2.x but fails using 3.x in the following way:

image

Reproduction

attempt to prefect deploy my_flows/some_params.py:some_params using a prefect.yaml deployments block like the below:

...
deployments:
- name: deploy-some-params
  version:
  tags: []
  description:
  entrypoint: my_flows/some_params.py:some_params
  triggers:
  - type: event
    enabled: true
    match:
      prefect.resource.id: collin
    expect:
    - collins-event
    posture: Reactive
    threshold: 5
    within: 60  # fails because of this
    name: deploy-some-params__automation_1
  schedules: []
  pull:
  - prefect.deployments.steps.set_working_directory:
      directory: /Users/collin/code/prefect
  enforce_parameter_schema: true
  work_pool:
    name: turtles
    work_queue_name:
    job_variables: {}

Error

> Unexpected template type 'timedelta'

Versions (prefect version output)

main

Additional context

No response