ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR: insert or update on table "ci_stages" violates foreign key const...
https://sentry.gitlap.com/gitlab/gitlabcom/issues/174685/
PG::ForeignKeyViolation: ERROR: insert or update on table "ci_stages" violates foreign key constraint "fk_fb57e6cc56"
DETAIL: Key (pipeline_id)=(9569907) is not present in table "ci_pipelines".
peek/views/pg.rb:17:in `async_exec'
super(*args)
peek/views/pg.rb:17:in `async_exec'
super(*args)
active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
log(sql, name, binds) { @connection.async_exec(sql, []) }
active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
:binds => binds) { yield }
active_support/notifications/instrumenter.rb:20:in `instrument'
yield payload
...
(82 additional frame(s) were not displayed)
ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR: insert or update on table "ci_stages" violates foreign key constraint "fk_fb57e6cc56"
DETAIL: Key (pipeline_id)=(9569907) is not present in table "ci_pipelines".
: INSERT INTO "ci_stages" ("name", "pipeline_id", "created_at", "updated_at") VALUES ('deploy', 9569907, '2018-05-04 01:10:08.512790', '2018-05-04 01:10:08.512790') RETURNING "id"
PG::ForeignKeyViolation: ERROR: insert or update on table "ci_stages" violates foreign key constraint "fk_fb57e6cc56"
DETAIL: Key (pipeline_id)=(9569907) is not present in table "ci_pipelines".
: INSERT INTO "ci_stages" ("name", "pipeline_id", "created_at", "updated_at") VALUES ('deploy', 9569907, '2018-05-04 01:10:08.512790', '2018-05-04 01:10:08.512790') RETURNING "id"