Skip to content

Upgrade error due to BackfillDismissalReasonInVulnerabilityReads migration failing with null value in column

A failure was seen in one of our performance test environments today with a finalized migration:

    There was an error running gitlab-ctl reconfigure:
  
    rails_migration[gitlab-rails] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: bash_hide_env[migrate gitlab-rails database] (gitlab::database_migrations line 20) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
    ---- Begin output of "bash"  ----
    STDOUT: rake aborted!
    StandardError: An error has occurred, all later migrations canceled:
  
    PG::NotNullViolation: ERROR:  null value in column "created_at" of relation "vulnerability_state_transitions" violates not-null constraint

The migration in question is BackfillDismissalReasonInVulnerabilityReads and it was finalised last week in !137999 (merged).