Skip to content

Auto DevOps generating 500 errors

I went in and enabled Auto DevOps on a straight forward Ruby demo app from I2P with no changes. That worked, but I forgot to set the domain name. (Should be a required field when specifically ON: https://gitlab.com/gitlab-org/gitlab-ce/issues/37894)

When going back in and setting it, I got a 500 error when trying to save the change:

2017-09-15T03:26:52.438020725Z ==> /var/log/gitlab/gitlab-rails/production_json.log <==
2017-09-15T03:26:52.438024758Z {"method":"PATCH","path":"/root/minimal-ruby-app/pipelines/settings","format":"html","controller":"Projects::PipelinesSettingsController","action":"update","status":500,"error":"ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR:  null value in column \"project_id\" violates not-null constraint\nDETAIL:  Failing row contains (1, null, 2017-09-15 03:25:24.033018+00, 2017-09-15 03:26:52.431405+00, t, ).\n: UPDATE \"project_auto_devops\" SET \"project_id\" = $1, \"updated_at\" = $2 WHERE \"project_auto_devops\".\"id\" = $3","duration":21.14,"view":0.0,"db":2.66,"time":"2017-09-15T03:26:52.416Z","params":{"utf8":"✓","_method":"patch","authenticity_token":"[FILTERED]","project":{"auto_devops_attributes":{"enabled":"true","domain":"gitlab-ci.com"},"runners_token":"[FILTERED]","build_allow_git_fetch":"true","build_timeout_in_minutes":"60","ci_config_path":"","public_builds":"1","auto_cancel_pending_pipelines":"enabled","build_coverage_regex":""},"namespace_id":"root","project_id":"minimal-ruby-app"},"remote_ip":"127.0.0.1","user_id":1,"username":"root"}
2017-09-15T03:26:52.439659287Z 
2017-09-15T03:26:52.439669774Z ==> /var/log/gitlab/gitlab-rails/production.log <==
2017-09-15T03:26:52.439672724Z 
2017-09-15T03:26:52.439674754Z ActiveRecord::StatementInvalid (PG::NotNullViolation: ERROR:  null value in column "project_id" violates not-null constraint
2017-09-15T03:26:52.439677336Z DETAIL:  Failing row contains (1, null, 2017-09-15 03:25:24.033018+00, 2017-09-15 03:26:52.431405+00, t, ).
2017-09-15T03:26:52.439679527Z : UPDATE "project_auto_devops" SET "project_id" = $1, "updated_at" = $2 WHERE "project_auto_devops"."id" = $3):
2017-09-15T03:26:52.439682437Z   config/initializers/active_record_locking.rb:16:in `_update_record'
2017-09-15T03:26:52.43968451Z   app/controllers/projects/pipelines_settings_controller.rb:9:in `update'
2017-09-15T03:26:52.439686847Z   lib/gitlab/i18n.rb:46:in `with_locale'
2017-09-15T03:26:52.439689256Z   lib/gitlab/i18n.rb:52:in `with_user_locale'
2017-09-15T03:26:52.439691596Z   app/controllers/application_controller.rb:334:in `set_locale'
2017-09-15T03:26:52.439693624Z   lib/gitlab/middleware/multipart.rb:93:in `call'
2017-09-15T03:26:52.43969576Z   lib/gitlab/request_profiler/middleware.rb:14:in `call'
2017-09-15T03:26:52.439697782Z   lib/gitlab/jira/middleware.rb:15:in `call'
2017-09-15T03:26:52.439699972Z   lib/gitlab/middleware/go.rb:17:in `call'
2017-09-15T03:26:52.43970198Z   lib/gitlab/etag_caching/middleware.rb:11:in `call'
2017-09-15T03:26:52.43970418Z   lib/gitlab/middleware/readonly_geo.rb:30:in `call'
2017-09-15T03:26:52.439706236Z   lib/gitlab/request_context.rb:18:in `call'
2017-09-15T03:26:52.43970847Z   lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
2017-09-15T03:26:52.4397106Z 
2017-09-15T03:26:52.439712679Z 
2017-09-15T03:26:52.440441337Z 

I then went in and just tried to turn off Auto DevOps, and still getting a 500 error. Seems like CI/CD settings are broken right now.

Edited by silv