This release brings some exciting enhancements and fixes!
Enhanced UI Customization 📆
- Now featuring relative time spans like "Past 7 days" for better insight into current and upcoming flow runs across the UI.
- Flow Runs Page: Enhanced with customizable date and time filters. Save custom filters with specific date ranges for tailored views
- Flows Page: Updated with similar date and time filtering capabilities
Get type-checked input from humans in the loop
Human-in-the-loop flows just got an upgrade. You can now pause or suspend a flow and wait for type-checked input. To get started, declare the structure of the input data using a Pydantic model, and Prefect will render a form dynamically in the UI when a human resumes the flow. Form validation will ensure that the data conforms to your Pydantic model, and your flow will receive tbe input.
![image](https://private-user-images.githubusercontent.com/97182/292048154-ac743557-e872-4b48-a61e-c74c95e076f0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxMjI2NDgsIm5iZiI6MTcwMzEyMjM0OCwicGF0aCI6Ii85NzE4Mi8yOTIwNDgxNTQtYWM3NDM1NTctZTg3Mi00YjQ4LWE2MWUtYzc0Yzk1ZTA3NmYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjIxVDAxMzIyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU2YzM1N2MyN2E3ODExYzNiNjdjYTBhYjg4NmRiZWQyZDExYTQ2YTVlMmJkZWRjMzQ0M2JkZGMxODUyMDExYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1dzH7YCkU9pLdjOCjm2Jdejsom0-KMyQVLRELwpYggo)
Prefect's new RunInput
class powers this experience. RunInput
is a subclass of Pydantic's BaseModel
. Here's an example of a RunInput
that uses dates, literals, and nested Pydantic models to show you what's possible:
class Person(RunInput):
first_name: str
last_name: str
birthday: datetime.date
likes_tofu: bool
age: int = Field(gt=0, lt=150)
shirt_size: Literal[ShirtSize.SMALL, ShirtSize.MEDIUM, ShirtSize.LARGE,
ShirtSize.XLARGE]
shirt_color: Literal["red", "blue", "green"]
preferred_delivery_time: datetime.datetime
shipping_address: ShippingAddress
billing_address: BillingAddress | SameAsShipping = Field(
title="", default_factory=SameAsShipping
)
Check out our guide on how to create human-in-the-loop flows to learn more!
Enhancements and Fixes 🛠️
- Fixed environment variable parsing during deployment and prompt and role assignment in the
ContainerInstanceProvisioner
- Enhanced dashboard header to adapt to various tag and date input sizes
- Addressed an error encountered when deploying flows with options
See the release notes for details!