Open gaprl opened 4 weeks ago
As for solar schedules: we currently only support crontab
and schedule
schedules in Celery, for everything else we print a warning: https://github.com/getsentry/sentry-python/blob/antonpirker/trace-origin-in-integrations/sentry_sdk/integrations/celery/beat.py#L90
About the invalid Celery crontab definition. We probably need to improve our transaction from Celery crontab definition to the one we send to Sentry implemented here: https://github.com/getsentry/sentry-python/blob/antonpirker/trace-origin-in-integrations/sentry_sdk/integrations/celery/beat.py#L67-L75
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.3.1
Steps to Reproduce
Create a new Celery task with a crontab schedule of "0 0 saturday". The monitor for the task won't be upserted in Crons.
Expected Result
The monitor and check-ins should be created in Crons.
Actual Result
This happens because
0 0 * * saturday
is not a valid crontab schedule, but it is a valid task schedule in Celery.This is the complete payload that has failed validation on our end:
Here's the definition for the task: https://github.com/getsentry/sentry/blob/d92153e4f39810ed5b91a1e5e340a51e3cf507ec/src/sentry/conf/server.py#L1112-L1116
Perhaps we can map these unique Celery schedule definitions to a valid Crontab? Celery also supports solar schedules, so not sure what we want to do there.