<@ULVA73B9P> we have had a few people removing dep...
# ask-marvin
d
@Marvin we have had a few people removing deployments from the deployment file. Now when we have tried to restart the docker compose environment we are getting errors that we have not run into before. The first error in loading is "200757.383 | ERROR | prefect.server.services.scheduler - Error scheduling deployment UUID('bc426aaf-1be2-4fd9-84dc-20606e309808'). Traceback (most recent call last):". Something else we say was to have to do with pydantic "pydantic.error_wrappers.ValidationError: 8 validation errors for ParsingModel[Union[IntervalSchedule, CronSchedule, RRuleSchedule]] root -> interval field required (type=value_error.missing) root -> timezone argument of type 'function' is not iterable (type=type_error) root -> cron extra fields not permitted (type=value_error.extra) root -> day_or extra fields not permitted (type=value_error.extra) root -> timezone argument of type 'function' is not iterable (type=type_error) root -> rrule field required (type=value_error.missing) root -> cron extra fields not permitted (type=value_error.extra) root -> day_or extra fields not permitted (type=value_error.extra)"
m
The error message you encountered indicates there are some validation issues with the scheduling properties of a deployment when the Prefect instance is trying to schedule a deployment with the given UUID. The
ValidationError
from
pydantic
points out multiple issues, including missing
interval
and
rrule
fields for the schedule, as well as issues with
timezone
,
cron
, and
day_or
fields. To narrow down the issue, it looks like there is possibly a mismatch between the expected schedule format and the way the schedule fields are populated in the deployment. This could be caused by incorrect or incomplete schedule definitions, or there might be a bug in the way schedules are being parsed or validated. From the error messages and the search results in the Prefect GitHub issues, it seems like there might be a specific issue with the Prefect scheduler and the Pydantic validation in the version of Prefect you are running. One GitHub issue refers to an error with cron expressions not supporting the slash "/" format, which suggests that certain cron expressions might not be properly validated or executed by Prefect. Another issue talks about missing properties for deployment. It's crucial to ensure that the deployment's schedule is correctly defined. For instance, if you have an interval schedule, you need to provide the interval information, and for a cron schedule, you need to ensure that the cron expression is correct and complies with the supported formats. If you've recently upgraded Prefect or made changes to the deployment files, you may also want to ensure that these changes are compatible with your current version of Prefect and review the deployment definitions to make sure they are correct. To start, you should: 1. Review and validate the deployment schedules in your deployment definitions. 2. Make sure the formats used for cron expressions are supported by your version of Prefect. 3. Consult the Prefect documentation regarding schedule definitions to confirm that your deployments are configured properly. 4. If you have made changes to your Prefect version, check the release notes or Prefect's GitHub issues for any known bugs or breaking changes regarding schedules. It might also be helpful to review your deployments file and make sure all necessary fields are properly defined and that no unsupported attributes or configurations are used. If you need further help debugging the precise cause or resolving the issue, providing more specific details about your deployment configurations and the Prefect version in use would be necessary.
d
Would changing to prefect >= 2.14.11 cause issues with prefect.orion? I know it was being deprecated at some point.
n
yeah it would, its been removed for a while now
d
Okay thanks
n
👍 fwiw your changes should be most a big old find and replace for
from prefect.orion
to
from prefect.server
and
PREFECT_ORION...
->
PREFECT_SERVER...
and everything you got from
prefect.orion.schemas
you'd now get from
prefect.client.schemas
whole list of changes here