Bump rufus-scheduler to 3.5.0
It turned out there is a problem with the current code that we can't bump rufus-scheduler gem to 3.5.0.
We should resolve the problem to keep the gem up-to-date.
Old issue title: unneeded check in lib/gitlab/ci/cron_parser.rb
def try_parse_cron(cron, cron_timezone)
cron_line = Rufus::Scheduler.parse("#{cron} #{cron_timezone}")
cron_line if cron_line.is_a?(Rufus::Scheduler::CronLine)
rescue
# noop
end
The parser in rufus-scheduler 3.4.x and 3.5.x throws argument error if the cron line can not be parsed. The problem is when you want to push rufus-scheduler to 3.5.x, the parse method returns a Fugit::Cron now, which breaks the assumption in the code.
Would removing the is_a? check and relying on the exception be ok?
Edited by 🤖 GitLab Bot 🤖