[Master Broken] Job Failed #2085927671
Job #2085927671 failed for abb061e2:
Errors are:
Failures:
1) DeleteServiceTemplateRecords deletes template records and associated data
Failure/Error: connection.send(...)
StandardError:
An error has occurred, this and all later migrations canceled:
PG::CheckViolation: ERROR: no partition of relation "loose_foreign_keys_deleted_records" found for row
DETAIL: Partition key of the failing row contains (partition) = (1).
CONTEXT: SQL statement "INSERT INTO loose_foreign_keys_deleted_records
(fully_qualified_table_name, primary_key_value)
SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table"
PL/pgSQL function insert_into_loose_foreign_keys_deleted_records() line 3 at SQL statement
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:67:in `block (2 levels) in <class:ConnectionProxy>'
# ./db/post_migrate/20220202105733_delete_service_template_records.rb:9:in `up'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./lib/gitlab/database.rb:265:in `block in transaction'
# ./lib/gitlab/database.rb:264:in `transaction'
# ./lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
# ./spec/support/helpers/migrations_helpers.rb:151:in `migrate!'
# ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:28:in `block (3 levels) in <top (required)>'
# ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:28:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:412:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:403:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:399:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:399:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database_cleaner.rb:39:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::CheckViolation:
# ERROR: no partition of relation "loose_foreign_keys_deleted_records" found for row
# DETAIL: Partition key of the failing row contains (partition) = (1).
# CONTEXT: SQL statement "INSERT INTO loose_foreign_keys_deleted_records
# (fully_qualified_table_name, primary_key_value)
# SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table"
# PL/pgSQL function insert_into_loose_foreign_keys_deleted_records() line 3 at SQL statement
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
2) DeleteServiceTemplateRecords does not delete non template records
Failure/Error: connection.send(...)
StandardError:
An error has occurred, this and all later migrations canceled:
PG::CheckViolation: ERROR: no partition of relation "loose_foreign_keys_deleted_records" found for row
DETAIL: Partition key of the failing row contains (partition) = (1).
CONTEXT: SQL statement "INSERT INTO loose_foreign_keys_deleted_records
(fully_qualified_table_name, primary_key_value)
SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table"
PL/pgSQL function insert_into_loose_foreign_keys_deleted_records() line 3 at SQL statement
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:67:in `block (2 levels) in <class:ConnectionProxy>'
# ./db/post_migrate/20220202105733_delete_service_template_records.rb:9:in `up'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:112:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:172:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:110:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:125:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:77:in `transaction'
# ./lib/gitlab/database.rb:265:in `block in transaction'
# ./lib/gitlab/database.rb:264:in `transaction'
# ./lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
# ./spec/support/helpers/migrations_helpers.rb:151:in `migrate!'
# ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:39:in `block (3 levels) in <top (required)>'
# ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:39:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:412:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:403:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:399:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:399:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <top (required)>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <top (required)>'
# ./spec/support/database_cleaner.rb:39:in `block (2 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <top (required)>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::CheckViolation:
# ERROR: no partition of relation "loose_foreign_keys_deleted_records" found for row
# DETAIL: Partition key of the failing row contains (partition) = (1).
# CONTEXT: SQL statement "INSERT INTO loose_foreign_keys_deleted_records
# (fully_qualified_table_name, primary_key_value)
# SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table"
# PL/pgSQL function insert_into_loose_foreign_keys_deleted_records() line 3 at SQL statement
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
Finished in 7 minutes 43 seconds (files took 29.33 seconds to load)
75 examples, 2 failures
Failed examples:
rspec ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:27 # DeleteServiceTemplateRecords deletes template records and associated data
rspec ./spec/migrations/20220202105733_delete_service_template_records_spec.rb:38 # DeleteServiceTemplateRecords does not delete non template records