Yashwanth V
02/29/2024, 11:12 AMMarvin
02/29/2024, 11:12 AMYashwanth V
02/29/2024, 11:12 AMraise self._exception
File "/root/rad_details-/env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 388, in _run_async
result = await coro
File "/root/rad_details-/env/lib/python3.10/site-packages/prefect/deployments/deployments.py", line 842, in apply
DeploymentScheduleCreate(
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for DeploymentScheduleCreate
active
none is not an allowed value (type=type_error.none.not_allowed)
Marvin
02/29/2024, 11:13 AMValidationError
while trying to schedule a task in Prefect due to a field not accepting a None
value. This is likely a symptom of a version- or configuration-specific issue within Prefect wherein certain defaults or allowances were changed.
Here's a summary of potential actions to resolve this:
1. Ensure all required values are set and not None
, particularly if they pertain to scheduling configurations.
2. Check for any Prefect updates or patches related to your issue, as such issues are typically addressed in subsequent releases.
3. Review your version of Prefect and consider upgrading if you're behind. To find the latest Prefect version refer to the latest release notes.
There is a specific case similar to the error you are witnessing reported in Prefect GitHub issue #7911. The user was facing a ValidationError
due to a None
value that wasn't accepted where previously it was. It was related to Kubernetes deployment and default values.
Since you're scheduling a deployment, it's also worth mentioning a pull request #7430 that might be of interest. It exposes is_schedule_active
option on the Deployment
class, allowing deployments to be applied without enabling their schedules. The correct use involves setting is_schedule_active
to True
or False
when building your Deployment
object.
Lastly, it might be related to correct handling of customizations, as outlined in issue #7943, where proper formatting and setting of the deployments' override parameters are pointed out.
Please ensure your configuration is in line with the correct usage patterns indicated by these sources. If the issue persists, you might consider opening an issue on the Prefect GitHub with the specific details of your problem for further support from the community.