-
Notifications
You must be signed in to change notification settings - Fork 3
Cron does not correctly validate CloudWatch expressions where the minutes field contains a / #1
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 @torybenya, thank you for creating an issue for that error. It turned out the regex validation for The code and tests have been updated and release v1.0.6 has been uploaded to PyPI. Would you mind letting me know how it's working for you now please? If it's all good, we can close the issue. Cheers! |
@grumBit - thank you for the fast fix! I have one more question/request. |
@torybenya - I didn't have any technical reason for picking Python 3.9, it was just the one I'd been using when I created the package. I got the CI/CD to test using Python 3.7 (the oldest currently supported) and it worked fine, so I've made it the minimum dependency and released v1.0.7 of the package. I think the Python Hopefully it'll now work happily with your environment. Let me know how you get on. Cheers! |
@grumBit - thank you so much - everything is building happily now. Really appreciate your work on this. |
@torybenya - it's a pleasure! I'm glad people are getting use from my pet regex and PyPI packaging learning project. I'm planning on adding some specific ValueError exceptions so that the error message string doesn't have to be inspected to determine what kind of error occurred. It'll all extend from ValueError, so will be completely backward compatible. I'm not sure if better error handling will be useful for what you're doing. If it is let me know and I'll get it done quickly. Cheers! |
@grumBit - thanks for the willingness to improve this module, but this works fine as-is for our purposes. Don't let that dissuade you though. |
Hey folks - first of all, thank you for all the work writing the regex expressions. These seem/ed incredibly painful.
However as I was going through the test cases in my app for CloudWatch, I noticed there were 3 cases at the bottom of the table on this page (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html) which were not properly validated:
I believe the fix shouldn't be complicated, I have a locally modified version of the codebase running successfully locally just by adding an additional separate validator that is essentially just:
r"0\/{0-9}{1,2}
Is there any way this can be fixed? I would offer to open a PR, but unfortunately I may or may not be allowed to do so by the terms of my current employment. (I can look into this more if a PR would help, let me know.)
The text was updated successfully, but these errors were encountered: