diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-26 21:44:21 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-26 21:44:21 +0300 |
commit | caeb4597a5b24e0eaa96b24901ce9208c2eef4bf (patch) | |
tree | 293c4fd1a71a44797eeb2662fec4743b8ebaa7b5 /app | |
parent | 20e63ba1567dc18878e48e59df95ff9c7729d071 (diff) | |
parent | 9e396d6e1c975aece20877623973dcd2d6941355 (diff) |
Merge branch 'mk/fix-callback-canceling-in-namespace-move-dir' into 'master'
Fix namespace move callback behavior, especially to fix Geo replication of namespace moves during certain exceptions
Closes gitlab-ee#6252
See merge request gitlab-org/gitlab-ce!19297
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/storage/legacy_namespace.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/models/concerns/storage/legacy_namespace.rb b/app/models/concerns/storage/legacy_namespace.rb index f66bdd529f1..ae6595320cb 100644 --- a/app/models/concerns/storage/legacy_namespace.rb +++ b/app/models/concerns/storage/legacy_namespace.rb @@ -34,13 +34,12 @@ module Storage begin send_update_instructions write_projects_repository_config - - true - rescue - # Returning false does not rollback after_* transaction but gives - # us information about failing some of tasks - false + rescue => e + # Raise if development/test environment, else just notify Sentry + Gitlab::Sentry.track_exception(e, extra: { full_path_was: full_path_was, full_path: full_path, action: 'move_dir' }) end + + true # false would cancel later callbacks but not rollback end # Hooks |