Error while saving project pipeline settings after upgrade from ce to ee
Summary
We have upgraded our gitlab-ce to ee (version 10.8.4-ee f80a5284) and when I save the project general pipeline settings it ends up with a 500 error. Strangely this affects only one project for now (around 40 project).
here is the traceback:
Started PATCH "/libraries/example/settings/ci_cd" for 192.168.2.109 at 2018-06-13 14:40:13 +0000
Processing by Projects::Settings::CiCdController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "project"=>{"runners_token"=>"[FILTERED]", "build_allow_git_fetch"=>"true", "build_timeout_human_readable"=>"1h", "ci_config_path"=>"", "public_builds"=>"1", "auto_cancel_pending_pipelines"=>"enabled", "build_coverage_regex"=>"\\d+\\%\\s*$"}, "namespace_id"=>"libraries", "project_id"=>"example"}
Completed 500 Internal Server Error in 50ms (ActiveRecord: 9.1ms | Elasticsearch: 0.0ms)
NoMethodError (undefined method `previous_changes' for nil:NilClass):
app/services/projects/update_service.rb:47:in `run_auto_devops_pipeline?'
app/controllers/projects/settings/ci_cd_controller.rb:49:in `run_autodevops_pipeline'
app/controllers/projects/settings/ci_cd_controller.rb:16:in `block in update'
app/controllers/projects/settings/ci_cd_controller.rb:11:in `tap'
app/controllers/projects/settings/ci_cd_controller.rb:11:in `update'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:363:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
ee/lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
Steps to reproduce
not sure this and the other part are relevant but this is the page that is affecting us. open //settings/ci_cd and try to save.