[ARVADOS] updated: 2.1.0-37-g0ef602be0

Git user git at public.arvados.org
Tue Nov 3 17:15:05 UTC 2020


Summary of changes:
 services/api/app/models/link.rb                         |  1 +
 .../db/migrate/20201103170213_refresh_trashed_groups.rb | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 services/api/db/migrate/20201103170213_refresh_trashed_groups.rb

       via  0ef602be056e09397772d1e4ba066b7353b10c73 (commit)
      from  5915604c6c8f2f45b540cfc7c21b28f5e165d1a9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0ef602be056e09397772d1e4ba066b7353b10c73
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Nov 3 12:12:59 2020 -0500

    17040: RefreshTrashedGroups migration, clear_permissions calls forget_cached_group_perms
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/app/models/link.rb b/services/api/app/models/link.rb
index eb6ff4c6b..83043a56d 100644
--- a/services/api/app/models/link.rb
+++ b/services/api/app/models/link.rb
@@ -143,6 +143,7 @@ class Link < ArvadosModel
   def clear_permissions
     if self.link_class == 'permission'
       update_permissions tail_uuid, head_uuid, REVOKE_PERM, self.uuid
+      current_user.forget_cached_group_perms
     end
   end
 
diff --git a/services/api/db/migrate/20201103170213_refresh_trashed_groups.rb b/services/api/db/migrate/20201103170213_refresh_trashed_groups.rb
new file mode 100644
index 000000000..4e8c245c8
--- /dev/null
+++ b/services/api/db/migrate/20201103170213_refresh_trashed_groups.rb
@@ -0,0 +1,17 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+require '20200501150153_permission_table_constants'
+
+class RefreshTrashedGroups < ActiveRecord::Migration[5.2]
+  def change
+    # The original refresh_trashed query had a bug, it would insert
+    # all trashed rows, including those with null trash_at times.
+    # This went unnoticed because null trash_at behaved the same as
+    # not having those rows at all, but it is inefficient to fetch
+    # rows we'll never use.  That bug is fixed in the original query
+    # but we need another migration to make sure it runs.
+    refresh_trashed
+  end
+end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list