Name |
Last commit
|
Last update |
---|---|---|
.. | ||
build | ||
config | ||
pipeline | ||
status | ||
trace | ||
variables | ||
ansi2html.rb | ||
charts.rb | ||
config.rb | ||
cron_parser.rb | ||
mask_secret.rb | ||
model.rb | ||
trace.rb | ||
yaml_processor.rb |
BigW Consortium Gitlab
In Rails 4.2.10 the `ActiveSupport::TimeZone.find_tzinfo(timezone_name)` method calls `TZInfo::TimezoneProxy.new(timezone_name)` which returns `timezone_name` if it is invalid. But in Rails 5.0 the `ActiveSupport::TimeZone.find_tzinfo(timezone_name)` method now calls the `TZInfo::Timezone.new(timezone_name)` method which throws the `TZInfo::InvalidTimezoneIdentifier: Invalid identifier` exception if `timezone_name` is invalid. This commit adds the rescue block to return timezone name if the exception is raised. Also this change fixes the error: ``` 1) Ci::PipelineSchedule validations does not allow invalid cron patters Failure/Error: ActiveSupport::TimeZone.find_tzinfo(timezone).name TZInfo::InvalidTimezoneIdentifier: Invalid identifier # ./lib/gitlab/ci/cron_parser.rb:28:in `timezone_name' # ./lib/gitlab/ci/cron_parser.rb:9:in `initialize' # ./app/validators/cron_validator.rb:6:in `new' # ./app/validators/cron_validator.rb:6:in `validate_each' # ./spec/models/ci/pipeline_schedule_spec.rb:26:in `block (3 levels) in <top (required)>' ```
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
build | Loading commit data... | |
config | Loading commit data... | |
pipeline | Loading commit data... | |
status | Loading commit data... | |
trace | Loading commit data... | |
variables | Loading commit data... | |
ansi2html.rb | Loading commit data... | |
charts.rb | Loading commit data... | |
config.rb | Loading commit data... | |
cron_parser.rb | Loading commit data... | |
mask_secret.rb | Loading commit data... | |
model.rb | Loading commit data... | |
trace.rb | Loading commit data... | |
yaml_processor.rb | Loading commit data... |