Commit a3795a0c authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-too-many-loops-cron-error' into 'master'

Rescue too many loops cron error

Closes #58241

See merge request gitlab-org/gitlab-ce!28002
parents 5ec40522 ccde3916
...@@ -169,7 +169,7 @@ gem 'redis-namespace', '~> 1.6.0' ...@@ -169,7 +169,7 @@ gem 'redis-namespace', '~> 1.6.0'
gem 'gitlab-sidekiq-fetcher', '~> 0.4.0', require: 'sidekiq-reliable-fetch' gem 'gitlab-sidekiq-fetcher', '~> 0.4.0', require: 'sidekiq-reliable-fetch'
# Cron Parser # Cron Parser
gem 'fugit', '~> 1.1' gem 'fugit', '~> 1.2.1'
# HTTP requests # HTTP requests
gem 'httparty', '~> 0.16.4' gem 'httparty', '~> 0.16.4'
......
...@@ -192,7 +192,7 @@ GEM ...@@ -192,7 +192,7 @@ GEM
equalizer (0.0.11) equalizer (0.0.11)
erubi (1.8.0) erubi (1.8.0)
escape_utils (1.2.1) escape_utils (1.2.1)
et-orbi (1.1.7) et-orbi (1.2.1)
tzinfo tzinfo
eventmachine (1.2.7) eventmachine (1.2.7)
excon (0.62.0) excon (0.62.0)
...@@ -266,8 +266,8 @@ GEM ...@@ -266,8 +266,8 @@ GEM
foreman (0.84.0) foreman (0.84.0)
thor (~> 0.19.1) thor (~> 0.19.1)
formatador (0.2.5) formatador (0.2.5)
fugit (1.1.9) fugit (1.2.1)
et-orbi (~> 1.1, >= 1.1.7) et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.1) raabro (~> 1.1)
fuubar (2.2.0) fuubar (2.2.0)
rspec-core (~> 3.0) rspec-core (~> 3.0)
...@@ -1064,7 +1064,7 @@ DEPENDENCIES ...@@ -1064,7 +1064,7 @@ DEPENDENCIES
fog-rackspace (~> 0.1.1) fog-rackspace (~> 0.1.1)
font-awesome-rails (~> 4.7) font-awesome-rails (~> 4.7)
foreman (~> 0.84.0) foreman (~> 0.84.0)
fugit (~> 1.1) fugit (~> 1.2.1)
fuubar (~> 2.2.0) fuubar (~> 2.2.0)
gemojione (~> 3.3) gemojione (~> 3.3)
gettext (~> 3.2.2) gettext (~> 3.2.2)
......
---
title: Fix "too many loops" error by handling gracefully cron schedules for non existent days
merge_request: 28002
author:
type: fixed
...@@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do ...@@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do
it { expect(subject).to be_nil } it { expect(subject).to be_nil }
end end
context 'when cron is scheduled to a non existent day' do
let(:cron) { '0 12 31 2 *' }
let(:cron_timezone) { 'UTC' }
it { expect(subject).to be_nil }
end
end end
describe '#cron_valid?' do describe '#cron_valid?' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment