Skip to content

Add PagerDuty columns to Incident Management

What does this MR do?

Implements #227190 (closed)

Add PagerDuty integration columns to project_incident_management_settings table.

Migration log

→ be rails db:migrate
== 20200708080631 AddPagerDutyIntegrationColumnsToProjectIncidentManagementSettings: migrating
-- add_column(:project_incident_management_settings, :pagerduty_active, :boolean, {:null=>false, :default=>false})
   -> 0.0020s
-- add_column(:project_incident_management_settings, :encrypted_pagerduty_token, :binary, {:null=>true})
   -> 0.0003s
-- add_column(:project_incident_management_settings, :encrypted_pagerduty_token_iv, :binary, {:null=>true})
   -> 0.0004s
== 20200708080631 AddPagerDutyIntegrationColumnsToProjectIncidentManagementSettings: migrated (0.0028s)

== 20200710130234 AddLimitConstraintsToProjectIncidentManagementSettingsToken: migrating
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE project_incident_management_settings\nADD CONSTRAINT pagerduty_token_length_constraint\nCHECK ( octet_length(encrypted_pagerduty_token) <= 255 )\nNOT VALID;\n")
   -> 0.0006s
-- execute("ALTER TABLE project_incident_management_settings VALIDATE CONSTRAINT pagerduty_token_length_constraint;")
   -> 0.0005s
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE project_incident_management_settings\nADD CONSTRAINT pagerduty_token_iv_length_constraint\nCHECK ( octet_length(encrypted_pagerduty_token_iv) <= 12 )\nNOT VALID;\n")
   -> 0.0004s
-- execute("ALTER TABLE project_incident_management_settings VALIDATE CONSTRAINT pagerduty_token_iv_length_constraint;")
   -> 0.0005s
== 20200710130234 AddLimitConstraintsToProjectIncidentManagementSettingsToken: migrated (0.0122s)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • ~~Label as security and @ mention @gitlab-com/gl-security/appsec~~
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Vitali Tatarintev

Merge request reports