Creating "Schedule trigger" causes http-500 when accessing settings/ci_cd
Summary
Creating "Schedule trigger" causes http-500 when accessing settings/ci_cd for Gitlab CE 9.1.0-rc(1-5) installed from source.
Steps to reproduce
Install Gitlab CE 9.1.0-rc5 from source on Ubuntu 16.04. Create CI/CD trigger. Configure scheduled trigger and save.
What is the current bug behavior?
Causes http-500 when accessing CI/CD settings page from the project
What is the expected correct behavior?
Should display CI/CD settings.
Relevant logs and/or screenshots
NoMethodError: undefined method `next_time' for 2017-04-12 00:00:00 +0900:Time
from lib/gitlab/ci/cron_parser.rb:14:in `next_time_from'
from app/models/ci/trigger_schedule.rb:38:in `real_next_run'
from lib/gitlab/metrics/instrumentation.rb:156:in `block in real_next_run'
from lib/gitlab/metrics/method_call.rb:23:in `measure'
from lib/gitlab/metrics/instrumentation.rb:156:in `real_next_run'
from app/views/projects/triggers/_trigger.html.haml:34:in `_app_views_projects_triggers__trigger_html_haml__319996415304400637_60503900'
from action_view/template.rb:145:in `block in render'
from active_support/notifications.rb:166:in `instrument'
from action_view/template.rb:333:in `instrument'
from action_view/template.rb:143:in `render'
from action_view/renderer/partial_renderer.rb:436:in `block in collection_with_template'
from action_view/renderer/partial_renderer.rb:432:in `map'
from action_view/renderer/partial_renderer.rb:432:in `collection_with_template'
from action_view/renderer/partial_renderer.rb:324:in `render_collection'
from action_view/renderer/partial_renderer.rb:306:in `block in render'
from action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
from active_support/notifications.rb:166:in `instrument'
from action_view/renderer/abstract_renderer.rb:39:in `instrument'
from action_view/renderer/partial_renderer.rb:305:in `render'
from action_view/renderer/renderer.rb:51:in `render_partial'
from action_view/renderer/renderer.rb:25:in `render'
from action_view/helpers/rendering_helper.rb:32:in `render'
from app/views/projects/triggers/_index.html.haml:27:in `_app_views_projects_triggers__index_html_haml__3779967934564977888_70275020'
from action_view/template.rb:145:in `block in render'
from active_support/notifications.rb:166:in `instrument'
from action_view/template.rb:333:in `instrument'
from action_view/template.rb:143:in `render'
from action_view/renderer/partial_renderer.rb:339:in `render_partial'
from action_view/renderer/partial_renderer.rb:310:in `block in render'
from action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
from active_support/notifications.rb:166:in `instrument'
from action_view/renderer/abstract_renderer.rb:39:in `instrument'
from action_view/renderer/partial_renderer.rb:309:in `render'
from action_view/renderer/renderer.rb:51:in `render_partial'
from action_view/helpers/rendering_helper.rb:35:in `render'
from app/views/projects/settings/ci_cd/show.html.haml:6:in `_app_views_projects_settings_ci_cd_show_html_haml___3654299886634307773_78104880'
from action_view/template.rb:145:in `block in render'
from active_support/notifications.rb:166:in `instrument'
from action_view/template.rb:333:in `instrument'
from action_view/template.rb:143:in `render'
from action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
from action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
from active_support/notifications.rb:164:in `block in instrument'
from active_support/notifications/instrumenter.rb:20:in `instrument'
from active_support/notifications.rb:164:in `instrument'
from action_view/renderer/abstract_renderer.rb:39:in `instrument'
from action_view/renderer/template_renderer.rb:53:in `block in render_template'
from action_view/renderer/template_renderer.rb:61:in `render_with_layout'
from action_view/renderer/template_renderer.rb:52:in `render_template'
from action_view/renderer/template_renderer.rb:14:in `render'
from action_view/renderer/renderer.rb:46:in `render_template'
from action_view/renderer/renderer.rb:27:in `render'
from action_view/rendering.rb:100:in `_render_template'
from action_controller/metal/streaming.rb:217:in `_render_template'
from action_view/rendering.rb:83:in `render_to_body'
from action_controller/metal/rendering.rb:32:in `render_to_body'
from action_controller/metal/renderers.rb:37:in `render_to_body'
from abstract_controller/rendering.rb:25:in `render'
from action_controller/metal/rendering.rb:16:in `render'
from action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
from active_support/core_ext/benchmark.rb:12:in `block in ms'
from benchmark.rb:308:in `realtime'
from active_support/core_ext/benchmark.rb:12:in `ms'
from action_controller/metal/instrumentation.rb:44:in `block in render'
from action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
from active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
from action_controller/metal/instrumentation.rb:43:in `render'
from action_controller/metal/implicit_render.rb:10:in `default_render'
from action_controller/metal/implicit_render.rb:5:in `send_action'
from abstract_controller/base.rb:198:in `process_action'
from action_controller/metal/rendering.rb:10:in `process_action'
from abstract_controller/callbacks.rb:20:in `block in process_action'
from active_support/callbacks.rb:117:in `call'
from active_support/callbacks.rb:555:in `block (2 levels) in compile'
from active_support/callbacks.rb:505:in `call'
from active_support/callbacks.rb:92:in `__run_callbacks__'
from active_support/callbacks.rb:778:in `_run_process_action_callbacks'
from active_support/callbacks.rb:81:in `run_callbacks'
from abstract_controller/callbacks.rb:19:in `process_action'
from action_controller/metal/rescue.rb:29:in `process_action'
from action_controller/metal/instrumentation.rb:32:in `block in process_action'
from active_support/notifications.rb:164:in `block in instrument'
from active_support/notifications/instrumenter.rb:20:in `instrument'
from active_support/notifications.rb:164:in `instrument'
from action_controller/metal/instrumentation.rb:30:in `process_action'
from action_controller/metal/params_wrapper.rb:250:in `process_action'
from active_record/railties/controller_runtime.rb:18:in `process_action'
from abstract_controller/base.rb:137:in `process'
from action_view/rendering.rb:30:in `process'
from action_controller/metal.rb:196:in `dispatch'
from action_controller/metal/rack_delegation.rb:13:in `dispatch'
from action_controller/metal.rb:237:in `block in action'
from action_dispatch/routing/route_set.rb:74:in `dispatch'
from action_dispatch/routing/route_set.rb:43:in `serve'
from action_dispatch/routing/mapper.rb:49:in `serve'
from action_dispatch/journey/router.rb:43:in `block in serve'
from action_dispatch/journey/router.rb:30:in `each'
from action_dispatch/journey/router.rb:30:in `serve'
from action_dispatch/routing/route_set.rb:817:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from lib/gitlab/middleware/multipart.rb:93:in `call'
from lib/gitlab/request_profiler/middleware.rb:14:in `call'
from lib/gitlab/middleware/go.rb:16:in `call'
from lib/gitlab/etag_caching/middleware.rb:10:in `call'
from lib/gitlab/middleware/rails_queue_duration.rb:20:in `call'
from lib/gitlab/metrics/rack_middleware.rb:29:in `block in call'
from lib/gitlab/metrics/transaction.rb:49:in `run'
from lib/gitlab/metrics/rack_middleware.rb:29:in `call'
from warden/manager.rb:35:in `block in call'
from warden/manager.rb:34:in `catch'
from warden/manager.rb:34:in `call'
from rack/cors.rb:80:in `call'
from rack/attack.rb:107:in `call'
from rack/etag.rb:24:in `call'
from rack/conditionalget.rb:25:in `call'
from rack/head.rb:13:in `call'
from action_dispatch/middleware/params_parser.rb:27:in `call'
from action_dispatch/middleware/flash.rb:260:in `call'
from rack/session/abstract/id.rb:225:in `context'
from rack/session/abstract/id.rb:220:in `call'
from action_dispatch/middleware/cookies.rb:560:in `call'
from active_record/query_cache.rb:36:in `call'
from active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
from action_dispatch/middleware/callbacks.rb:29:in `block in call'
from active_support/callbacks.rb:88:in `__run_callbacks__'
from active_support/callbacks.rb:778:in `_run_call_callbacks'
from active_support/callbacks.rb:81:in `run_callbacks'
from action_dispatch/middleware/callbacks.rb:27:in `call'
from action_dispatch/middleware/remote_ip.rb:78:in `call'
from action_dispatch/middleware/debug_exceptions.rb:17:in `call'
from action_dispatch/middleware/show_exceptions.rb:30:in `call'
from rails/rack/logger.rb:38:in `call_app'
from rails/rack/logger.rb:20:in `block in call'
from active_support/tagged_logging.rb:68:in `block in tagged'
from active_support/tagged_logging.rb:26:in `tagged'
from active_support/tagged_logging.rb:68:in `tagged'
from rails/rack/logger.rb:20:in `call'
from lib/gitlab/request_context.rb:18:in `call'
from request_store/middleware.rb:9:in `call'
from action_dispatch/middleware/request_id.rb:21:in `call'
from rack/methodoverride.rb:22:in `call'
from rack/runtime.rb:18:in `call'
from rack/lock.rb:17:in `call'
from rack/sendfile.rb:113:in `call'
from raven/integrations/rack.rb:50:in `call'
from rails/engine.rb:518:in `call'
from rails/application.rb:165:in `call'
from rails/railtie.rb:194:in `public_send'
from rails/railtie.rb:194:in `method_missing'
from rack/urlmap.rb:66:in `block in call'
from rack/urlmap.rb:50:in `each'
from rack/urlmap.rb:50:in `call'
from unicorn/http_server.rb:562:in `process_client'
from unicorn/worker_killer.rb:52:in `process_client'
from unicorn/http_server.rb:658:in `worker_loop'
from unicorn/http_server.rb:508:in `spawn_missing_workers'
from unicorn/http_server.rb:519:in `maintain_worker_count'
from unicorn/http_server.rb:283:in `join'
from bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `<top (required)>'
from bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
from bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<main>'
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
bundle exec rake gitlab:env:info RAILS_ENV=productionSystem information System: Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.5.2 Bundler Version:1.14.6 Rake Version: 10.5.0 Redis Version: 3.0.6 Git Version: 2.11.0 Sidekiq Version:4.2.7
GitLab information Version: 9.1.0-rc5 Revision: 575701b Directory: /home/git/gitlab DB Adapter: postgresql URL: https://example.com HTTP Clone URL: https://example.com/some-group/some-project.git SSH Clone URL: ssh://git@ssh.example.com:22/some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: authentiq, github, bitbucket, gitlab, google_oauth2, facebook, twitter
GitLab Shell Version: 5.0.2 Repository storage paths:
- default: /home/git/data/repositories Hooks: /home/git/gitlab-shell/hooks Git: /usr/bin/git
Results of GitLab application Check
bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true Checking GitLab Shell ...GitLab Shell version >= 5.0.2 ? ... OK (5.0.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/2 ... ok 2/6 ... ok 3/8 ... ok 3/10 ... ok 3/11 ... ok 3/14 ... ok 3/15 ... ok 3/17 ... ok 2/18 ... ok 3/19 ... ok 2/20 ... ok 2/21 ... ok 3/26 ... ok 3/28 ... ok 2/29 ... ok 2/30 ... ok 4/32 ... ok 2/33 ... ok 4/35 ... ok 3/36 ... repository is empty 3/37 ... repository is empty 3/38 ... repository is empty 3/39 ... repository is empty 3/40 ... repository is empty 3/41 ... repository is empty 3/42 ... ok 3/43 ... ok 3/44 ... ok 3/45 ... repository is empty 4/46 ... ok 3/50 ... ok 2/53 ... ok 2/55 ... ok 2/56 ... ok 2/57 ... ok 2/58 ... ok 8/59 ... ok 8/60 ... ok 8/61 ... ok 8/62 ... ok 8/63 ... ok 8/64 ... ok 8/65 ... ok 8/67 ... ok 6/69 ... ok 10/71 ... ok 10/72 ... ok 10/73 ... ok 10/74 ... ok 6/75 ... ok 13/76 ... ok 2/78 ... ok 3/79 ... repository is empty 11/80 ... ok 21/82 ... repository is empty 22/83 ... ok Running /home/git/gitlab-shell/bin/check Check GitLab API access: OK Access to /home/git/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... yes MailRoom running? ... yes
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory setup correctly? ... yes Init script exists? ... yes Init script up-to-date? ... yes projects have namespace: ... 3/2 ... yes 2/6 ... yes 3/8 ... yes 3/10 ... yes 3/11 ... yes 3/14 ... yes 3/15 ... yes 3/17 ... yes 2/18 ... yes 3/19 ... yes 2/20 ... yes 2/21 ... yes 3/26 ... yes 3/28 ... yes 2/29 ... yes 2/30 ... yes 4/32 ... yes 2/33 ... yes 4/35 ... yes 3/36 ... yes 3/37 ... yes 3/38 ... yes 3/39 ... yes 3/40 ... yes 3/41 ... yes 3/42 ... yes 3/43 ... yes 3/44 ... yes 3/45 ... yes 4/46 ... yes 3/50 ... yes 2/53 ... yes 2/55 ... yes 2/56 ... yes 2/57 ... yes 2/58 ... yes 8/59 ... yes 8/60 ... yes 8/61 ... yes 8/62 ... yes 8/63 ... yes 8/64 ... yes 8/65 ... yes 8/67 ... yes 6/69 ... yes 10/71 ... yes 10/72 ... yes 10/73 ... yes 10/74 ... yes 6/75 ... yes 13/76 ... yes 2/78 ... yes 3/79 ... yes 11/80 ... yes 21/82 ... yes 22/83 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/usr/bin/git" Git version >= 2.7.3 ? ... yes (2.11.0) Active users: 6
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)