Fix test failure of spec/services/notification_service_spec.rb
What does this MR do and why?
There are some failed tests on the JH side, Here is the log. It seems that when the test creates a group A, and creates a group B which parent group is A, then creates a project C in group B. When the project calls root_ancestor method, nil is returned. So I tried to figure out what the problem was, then I found that if I called the root_ancestor
method after creating the project, the test was fixed. If you know the cause of the problem, I'd be happy for you to tell me.
Failures:
1) NotificationService Issues #relabeled_issue confidential issues emails subscribers of the issue's labels that can read the issue
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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'
# ./app/services/members/creator_service.rb:46:in `update_member'
# ./app/services/members/creator_service.rb:28:in `execute'
# ./app/models/project_team.rb:64:in `add_user'
# ./ee/app/models/ee/project_team.rb:21:in `add_user'
# ./app/models/project_team.rb:19:in `add_developer'
# ./app/models/project.rb:461:in `add_developer'
# ./spec/services/notification_service_spec.rb:1443:in `block (5 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
2) NotificationService Issues #removed_milestone_issue behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1478
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
3) NotificationService Issues #removed_milestone_issue behaves like project emails are disabled sends emails to someone
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1478
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
4) NotificationService Issues #removed_milestone_issue confidential issues emails subscribers of the issue's milestone that can read the issue
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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'
# ./app/services/members/creator_service.rb:46:in `update_member'
# ./app/services/members/creator_service.rb:28:in `execute'
# ./app/models/project_team.rb:64:in `add_user'
# ./ee/app/models/ee/project_team.rb:21:in `add_user'
# ./app/models/project_team.rb:19:in `add_developer'
# ./app/models/project.rb:461:in `add_developer'
# ./spec/services/notification_service_spec.rb:1494:in `block (5 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
5) NotificationService Issues #changed_milestone_issue behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1529
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
6) NotificationService Issues #changed_milestone_issue behaves like project emails are disabled sends emails to someone
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1529
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
7) NotificationService Issues #changed_milestone_issue confidential issues emails subscribers of the issue's milestone that can read the issue
Failure/Error: connection.send(...)
NoMethodError:
undefined method `apply_user_cap?' for nil:NilClass
# ./ee/app/models/ee/member.rb:150:in `set_membership_activation'
# ./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'
# ./app/services/members/creator_service.rb:46:in `update_member'
# ./app/services/members/creator_service.rb:28:in `execute'
# ./app/models/project_team.rb:64:in `add_user'
# ./ee/app/models/ee/project_team.rb:21:in `add_user'
# ./app/models/project_team.rb:19:in `add_developer'
# ./app/models/project.rb:461:in `add_developer'
# ./spec/services/notification_service_spec.rb:1545:in `block (5 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
8) NotificationService Issues #close_issue behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
Failure/Error: connection.send(...)
ActiveRecord::InvalidForeignKey:
PG::ForeignKeyViolation: ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
DETAIL: Key (user_id)=(266) is not present in table "users".
Shared Example Group: "participating by note notification" called from ./spec/services/notification_service_spec.rb:181
Shared Example Group: "participating notifications" called from ./spec/services/notification_service_spec.rb:1593
# ./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>'
# ./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/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/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'
# ./spec/services/notification_service_spec.rb:3614:in `build_group'
# ./spec/services/notification_service_spec.rb:137:in `block (4 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::ForeignKeyViolation:
# ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
# DETAIL: Key (user_id)=(266) is not present in table "users".
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
9) NotificationService Issues #close_issue behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1599
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
10) NotificationService Issues #close_issue behaves like project emails are disabled sends emails to someone
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1599
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
11) NotificationService Issues #reopen_issue behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
Failure/Error: connection.send(...)
ActiveRecord::InvalidForeignKey:
PG::ForeignKeyViolation: ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
DETAIL: Key (user_id)=(266) is not present in table "users".
Shared Example Group: "participating by note notification" called from ./spec/services/notification_service_spec.rb:181
Shared Example Group: "participating notifications" called from ./spec/services/notification_service_spec.rb:1640
# ./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>'
# ./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/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/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'
# ./spec/services/notification_service_spec.rb:3614:in `build_group'
# ./spec/services/notification_service_spec.rb:137:in `block (4 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::ForeignKeyViolation:
# ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
# DETAIL: Key (user_id)=(266) is not present in table "users".
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
12) NotificationService Issues #reopen_issue behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1646
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
13) NotificationService Issues #reopen_issue behaves like project emails are disabled sends emails to someone
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1646
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
14) NotificationService Issues #issue_moved behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
Failure/Error: connection.send(...)
ActiveRecord::InvalidForeignKey:
PG::ForeignKeyViolation: ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
DETAIL: Key (user_id)=(266) is not present in table "users".
Shared Example Group: "participating by note notification" called from ./spec/services/notification_service_spec.rb:181
Shared Example Group: "participating notifications" called from ./spec/services/notification_service_spec.rb:1671
# ./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>'
# ./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/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/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'
# ./spec/services/notification_service_spec.rb:3614:in `build_group'
# ./spec/services/notification_service_spec.rb:137:in `block (4 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::ForeignKeyViolation:
# ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
# DETAIL: Key (user_id)=(266) is not present in table "users".
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
15) NotificationService Issues #issue_moved behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1677
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
16) NotificationService Issues #issue_moved behaves like project emails are disabled sends emails to someone
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1677
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
17) NotificationService Issues #issue_cloned behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
Failure/Error: connection.send(...)
ActiveRecord::InvalidForeignKey:
PG::ForeignKeyViolation: ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
DETAIL: Key (user_id)=(266) is not present in table "users".
Shared Example Group: "participating by note notification" called from ./spec/services/notification_service_spec.rb:181
Shared Example Group: "participating notifications" called from ./spec/services/notification_service_spec.rb:1702
# ./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>'
# ./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/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/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'
# ./spec/services/notification_service_spec.rb:3614:in `build_group'
# ./spec/services/notification_service_spec.rb:137:in `block (4 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::ForeignKeyViolation:
# ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
# DETAIL: Key (user_id)=(266) is not present in table "users".
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
18) NotificationService Issues #issue_cloned behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1708
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
19) NotificationService Issues #issue_cloned behaves like project emails are disabled sends emails to someone
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1708
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
20) NotificationService Issues #issue_due behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
Failure/Error: connection.send(...)
ActiveRecord::InvalidForeignKey:
PG::ForeignKeyViolation: ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
DETAIL: Key (user_id)=(266) is not present in table "users".
Shared Example Group: "participating by note notification" called from ./spec/services/notification_service_spec.rb:181
Shared Example Group: "participating notifications" called from ./spec/services/notification_service_spec.rb:1747
# ./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>'
# ./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/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/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'
# ./spec/services/notification_service_spec.rb:3614:in `build_group'
# ./spec/services/notification_service_spec.rb:137:in `block (4 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::ForeignKeyViolation:
# ERROR: insert or update on table "members" violates foreign key constraint "fk_2e88fb7ce9"
# DETAIL: Key (user_id)=(266) is not present in table "users".
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `block in write_using_load_balancer'
21) NotificationService Issues #issue_due behaves like project emails are disabled sends no emails with project emails disabled
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1753
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:15:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
22) NotificationService Issues #issue_due behaves like project emails are disabled sends emails to someone
Failure/Error: raise StandardError, 'Must specify a root node' if root.parent_id
NoMethodError:
undefined method `parent_id' for nil:NilClass
Shared Example Group: "project emails are disabled" called from ./spec/services/notification_service_spec.rb:1753
# ./app/models/namespace/traversal_hierarchy.rb:23:in `initialize'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `new'
# ./app/models/namespace/traversal_hierarchy.rb:19:in `for_namespace'
# ./app/models/namespaces/traversal/linear.rb:191:in `sync_traversal_ids'
# ./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/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'
# ./spec/support/shared_examples/services/notification_service_shared_examples.rb:29:in `block (2 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (3 levels) in <top (required)>'
# ./spec/services/notification_service_spec.rb:20:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:423:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:414:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:45:in `with_raw_context'
# ./spec/spec_helper.rb:410:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:267: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/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)>'
# ./jh/spec/spec_helper.rb:15:in `block (2 levels) in <top (required)>'
Finished in 7 minutes 22 seconds (files took 43.71 seconds to load)
378 examples, 22 failures
Failed examples:
rspec ./spec/services/notification_service_spec.rb:1442 # NotificationService Issues #relabeled_issue confidential issues emails subscribers of the issue's labels that can read the issue
rspec './spec/services/notification_service_spec.rb[1:11:5:1:2:1]' # NotificationService Issues #removed_milestone_issue behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:5:1:2:2]' # NotificationService Issues #removed_milestone_issue behaves like project emails are disabled sends emails to someone
rspec ./spec/services/notification_service_spec.rb:1493 # NotificationService Issues #removed_milestone_issue confidential issues emails subscribers of the issue's milestone that can read the issue
rspec './spec/services/notification_service_spec.rb[1:11:6:1:2:1]' # NotificationService Issues #changed_milestone_issue behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:6:1:2:2]' # NotificationService Issues #changed_milestone_issue behaves like project emails are disabled sends emails to someone
rspec ./spec/services/notification_service_spec.rb:1544 # NotificationService Issues #changed_milestone_issue confidential issues emails subscribers of the issue's milestone that can read the issue
rspec './spec/services/notification_service_spec.rb[1:11:7:2:1:2:1]' # NotificationService Issues #close_issue behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
rspec './spec/services/notification_service_spec.rb[1:11:7:3:1]' # NotificationService Issues #close_issue behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:7:3:2]' # NotificationService Issues #close_issue behaves like project emails are disabled sends emails to someone
rspec './spec/services/notification_service_spec.rb[1:11:8:2:1:2:1]' # NotificationService Issues #reopen_issue behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
rspec './spec/services/notification_service_spec.rb[1:11:8:3:1]' # NotificationService Issues #reopen_issue behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:8:3:2]' # NotificationService Issues #reopen_issue behaves like project emails are disabled sends emails to someone
rspec './spec/services/notification_service_spec.rb[1:11:9:2:1:2:1]' # NotificationService Issues #issue_moved behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
rspec './spec/services/notification_service_spec.rb[1:11:9:3:1]' # NotificationService Issues #issue_moved behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:9:3:2]' # NotificationService Issues #issue_moved behaves like project emails are disabled sends emails to someone
rspec './spec/services/notification_service_spec.rb[1:11:10:2:1:2:1]' # NotificationService Issues #issue_cloned behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
rspec './spec/services/notification_service_spec.rb[1:11:10:3:1]' # NotificationService Issues #issue_cloned behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:10:3:2]' # NotificationService Issues #issue_cloned behaves like project emails are disabled sends emails to someone
rspec './spec/services/notification_service_spec.rb[1:11:11:3:1:2:1]' # NotificationService Issues #issue_due behaves like participating notifications behaves like participating by note notification for subgroups emails the participant
rspec './spec/services/notification_service_spec.rb[1:11:11:4:1]' # NotificationService Issues #issue_due behaves like project emails are disabled sends no emails with project emails disabled
rspec './spec/services/notification_service_spec.rb[1:11:11:4:2]' # NotificationService Issues #issue_due behaves like project emails are disabled sends emails to someone
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.