Migrations failure / Job Failed #36786799
It appears that we have a legitimate problem with migrations. Caught by GitLab QA.
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "application_settings_pkey"
DETAIL: Key (id)=(1) already exists.
: INSERT INTO "application_settings" ("default_artifacts_expire_in", "default_project_visibility", "default_projects_limit", "default_snippet_visibility", "default_group_visibility", "gravatar_enabled", "unique_ips_limit_per_user", "unique_ips_limit_time_window", "import_sources", "koding_enabled", "password_authentication_enabled", "plantuml_enabled", "repository_checks_enabled", "repository_storages", "restricted_visibility_levels", "signup_enabled", "uuid", "runners_registration_token", "health_check_access_token", "created_at", "updated_at", "sign_in_text_html", "help_page_text_html", "shared_runners_text_html", "after_sign_up_text_html", "cached_markdown_version", "id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27) RETURNING "id"
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/active_record_locking.rb:12:in `_create_record'
/opt/gitlab/embedded/service/gitlab-rails/app/models/application_setting.rb:291:in `create_from_defaults'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/current_settings.rb:52:in `uncached_application_settings'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/current_settings.rb:24:in `ensure_application_settings!'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/current_settings.rb:9:in `current_application_settings'
/opt/gitlab/embedded/service/gitlab-rails/app/models/user.rb:768:in `set_projects_limit'
(eval):17:in `block (2 levels) in run_file'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:53:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "application_settings_pkey"
DETAIL: Key (id)=(1) already exists.
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/active_record_locking.rb:12:in `_create_record'
/opt/gitlab/embedded/service/gitlab-rails/app/models/application_setting.rb:291:in `create_from_defaults'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/current_settings.rb:52:in `uncached_application_settings'
I'm trying to reproduce locally, but pulling gitlab/gitlab-ce:nightly
takes ages using GitLab Conference wifi.
Job #36786799 failed for gitlab-qa@1f6e8332:
Edited by Grzegorz Bizon