Flaky spec: spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb
Likely this is a problem with tests that execute very close to UTC midnight:
1) FixAutomaticIterationsCadencesStartDate#up updates automatic iterations_cadence records to use start dates of their earliest sprint records
Failure/Error: connection.send(...)
ActiveRecord::NotNullViolation:
PG::NotNullViolation: ERROR: null value in column "title" violates not-null constraint
DETAIL: Failing row contains (2, 2022-05-16 00:00:21.03383+00, 2022-05-16 00:00:21.03383+00, 2022-01-01, 2022-01-08, null, 48, 1, null, null, null, null, null, 1, 30, null).
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119: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:118:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:60:in `block (2 levels) in <class:ConnectionProxy>'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119: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:118:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:70:in `transaction'
# ./spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb:30:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:421:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:412:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:408:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:50:in `with_raw_context'
# ./spec/spec_helper.rb:408:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:269: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:42: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::NotNullViolation:
# ERROR: null value in column "title" violates not-null constraint
# DETAIL: Failing row contains (2, 2022-05-16 00:00:21.03383+00, 2022-05-16 00:00:21.03383+00, 2022-01-01, 2022-01-08, null, 48, 1, null, null, null, null, null, 1, 30, null).
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `block in write_using_load_balancer'
Finished in 11.58 seconds (files took 58.13 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb:47 # FixAutomaticIterationsCadencesStartDate#up updates automatic iterations_cadence records to use start dates of their earliest sprint records
Edited by Dylan Griffith