Transient failure in rspec migration job

rspec migration job failed with error in after(:context)

Finished in 16 minutes 4 seconds (files took 49.78 seconds to load)
139 examples, 0 failures, 1 error occurred outside of examples
An error occurred in an `after(:context)` hook.
Failure/Error:
  execute(<<~SQL)
    ALTER TABLE #{quote_table_name(table_name)}
    #{constraint_clauses.join(",\n")}
  SQL
StandardError:
  An error has occurred, all later migrations canceled:
  PG::DuplicateObject: ERROR:  constraint "check_fedff82d3b" for relation "iterations_cadences" already exists
# ./lib/gitlab/database/migration_helpers.rb:121:in `block in create_table_with_constraints'
# ./lib/gitlab/database/with_lock_retries.rb:121:in `run_block'
# ./lib/gitlab/database/with_lock_retries.rb:130:in `block in run_block_with_transaction'
# ./lib/gitlab/database/with_lock_retries.rb:125:in `run_block_with_transaction'
# ./lib/gitlab/database/with_lock_retries.rb:95:in `run'
# ./lib/gitlab/database/migration_helpers.rb:394:in `with_lock_retries'
# ./lib/gitlab/database/migration_helpers.rb:92:in `create_table_with_constraints'
# ./db/migrate/20201228110136_create_iterations_cadence.rb:11:in `up'
# ./spec/support/helpers/migrations_helpers.rb:118:in `block in schema_migrate_up!'
# ./spec/support/helpers/migrations_helpers.rb:128:in `disable_migrations_output'
# ./spec/support/helpers/migrations_helpers.rb:117:in `schema_migrate_up!'
# ./ee/spec/support/helpers/ee/migrations_helpers.rb:38:in `block in schema_migrate_up!'
# ./ee/spec/support/helpers/ee/migrations_helpers.rb:50:in `with_db_config'
# ./ee/spec/support/helpers/ee/migrations_helpers.rb:38:in `schema_migrate_up!'
# ./spec/support/migration.rb:27:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::DuplicateObject:
#   ERROR:  constraint "check_fedff82d3b" for relation "iterations_cadences" already exists
#   ./lib/gitlab/database/migration_helpers.rb:121:in `block in create_table_with_constraints'

https://gitlab.com/gitlab-org/gitlab/-/jobs/1085633766

Edited by Albert Salim