-
Notifications
You must be signed in to change notification settings - Fork 544
Non-standard Crontab syntax isn't being transformed for Crons check-ins #4413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @gaprl – in general, I'd say we should implement any data normalization/transformations in Relay or the backend so that we can use the logic across all SDKs.
|
Edit to above comment: after some further investigation, it seems Celery is using a non-standard flavor of cronjob syntax. In order to properly support all cron schedules in Sentry, we would need to add support in the backend for Celery cron schedules. I don't think this syntax difference is the cause of this issue, but it could cause other problems when using the crons product with Celery jobs. The issue I discovered would arise specifically when both the day of the month and the day of the week are specified (e.g. in Celery For this specific problem of a schedule like I'll close this issue for now since it should get fixed in Relay/the backend, but we should likely discuss further about the other problem with interactions between day of week and day of month; fixing this likely would require changes in both the Sentry backend and the SDKs |
Is there a new issue to track this? This is likely affecting customers too |
@evanpurkhiser I can write up a new issue for this tomorrow. I wasn't sure how much of an edge case it is for folks to have conflicting day of week and day of month entries, which might be handled differently depending on the cron implementation |
Hi @evanpurkhiser, made an issue over here: getsentry/sentry#92203 |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.29.1
Steps to Reproduce
We have the following monitor with
day_of_the_week
assat
, but this isn't a standard crontab schedule. We should parse this before sending the check-in to use a number from 1-7, otherwise Crons will not be able to process the check-in.Here's one of our own that doesn't work: https://github.com/getsentry/sentry/blob/e4a87d6bb80c52c24c5cfe58f5824252ce9ea6fd/src/sentry/conf/server.py#L1182-L1187
Expected Result
To parse "sat" as 6 when sending the monitor config.
Actual Result
The monitor with "sat" is sending the following check-in payload:
0 0 * * saturday
is invalid, it should be0 0 * * 6
The text was updated successfully, but these errors were encountered: