ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column "environment_id" violates not-null constraint
https://sentry.gitlab.net/gitlab/gitlabcom/issues/562310/
PG::NotNullViolation: ERROR: null value in column "environment_id" violates not-null constraint
DETAIL: Failing row contains (5488963, 1, 8776865, null, develop, f, c978de78f8db740dc88ecd1e732115568bf16751, 2915990, 120433023, CommitStatus, 2018-11-14 14:23:12.068325, 2018-11-14 14:23:12.068325, null, null, 0).
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
...
(365 additional frame(s) were not displayed)
ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column "environment_id" violates not-null constraint
DETAIL: Failing row contains (5488963, 1, 8776865, null, develop, f, c978de78f8db740dc88ecd1e732115568bf16751, 2915990, 120433023, CommitStatus, 2018-11-14 14:23:12.068325, 2018-11-14 14:23:12.068325, null, null, 0).
: INSERT INTO "deployments" ("project_id", "ref", "tag", "sha", "user_id", "status", "deployable_id", "deployable_type", "iid", "created_at", "updated_at") VALUES (8776865, 'develop', 'f', 'c978de78f8db740dc88ecd1e732115568bf16751', 2915990, 0, 120433023, 'CommitStatus', 1, '2018-11-14 14:23:12.068325', '2018-11-14 14:23:12.068325') RETURNING "id"
ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column "environment_id" violates not-null constraint
DETAIL: Failing row contains (5488963, 1, 8776865, null, develop, f, c978de78f8db740dc88ecd1e732115568bf16751, 2915990, 120433023, CommitStatus, 2018-11-14 14:23:12.068325, 2018-11-14 14:23:12.068325, null, null, 0).
: INSERT INTO "deployments" ("project_id", "ref", "tag", "sha", "user_id", "status", "deployable_id", "deployable_type", "iid", "created_at", "updated_at") VALUES (8776865, 'develop', 'f', 'c978de78f8db740dc88ecd1e732115568bf16751', 2915990, 0, 120433023, 'CommitStatus', 1, '2018-11-14 14:23:12.068325', '2018-11-14 14:23:12.068325') RETURNING "id"