diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 12:07:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 12:07:54 +0300 |
commit | 2705a15deaef07b1a38a53b9539d02f8ad499ce3 (patch) | |
tree | 33d51226e6c70efe71e5e531bb8073cb145bdc22 /app/services/members | |
parent | 1a397155d654096edc0a900e2b69f6913bc26eb4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/members')
-rw-r--r-- | app/services/members/creator_service.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/services/members/creator_service.rb b/app/services/members/creator_service.rb index 321658ac9c5..81986a2883f 100644 --- a/app/services/members/creator_service.rb +++ b/app/services/members/creator_service.rb @@ -82,7 +82,13 @@ module Members if member.request? approve_request else - member.save + # Calling #save triggers callbacks even if there is no change on object. + # This previously caused an incident due to the hard to predict + # behaviour caused by the large number of callbacks. + # See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/6351 + # and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80920#note_911569038 + # for details. + member.save if member.changed? end end |