Schedule Cronjob Expression parsing failure
Summary
In Gitlab 11.4 CE I had the following cron Expression for a job: " 0 6 * * SUN,WED". This was working fine. After upgrading to 11.8 this schedule suddenly became inactive. No errors are seen anywhere Going to the schedule page and just re-saving the page, I get the error
Cron is invalid syntax
See the white spacew at the beginning of the expression? This is what is causing the parsing error. Removing the white space solves the problem.
Steps to reproduce
In a pipeline configuration, go to schedule and create a new schedule with the following custom expression: " 0 6 * * SUN,WED" and then click save.
Example Project
I can not create an example, since the pipeline schedule won't save.
What is the current bug behavior?
I get the error "Cron is invalid syntax"
What is the expected correct behavior?
The schedule should save, at least that's how it behaved in 11.4
Relevant logs and/or screenshots
Possible fixes
Allow white spaces at the beginning and end of a cron expression and just trim the string
(If you can, link to the line of code that might be responsible for the problem)