You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2026/07/24 20:02:52 UTC

(allura) branch db/set_tool_data_deinstrument updated (5b3f57ee1 -> 9997b74b1)

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a change to branch db/set_tool_data_deinstrument
in repository https://gitbox.apache.org/repos/asf/allura.git


 discard 5b3f57ee1 get_tool_data should return ming-deinstrumented objects, so changes to them can't sync back to the database unexpectedly
     add c7a0209e5 [#8610] Implement field level encryption for Users email addresses
     add ad248b014 bumping soupsieve 2.8.3 -> 2.8.4
     add 1a5e50817 bumping Pillow 12.2.0 -> 12.3.
     add 81208e12f enable webp screenshots & attachments
     add 4b3b05dd7 make test more reliable (not reliant on fetching "url":"https://httpbin.org/image/png"
     add 93857a099 [#8613] Add encrypted field for user preferences email address
     add fb5549434 added CLAUDE.md
     new 9997b74b1 get_tool_data should return ming-deinstrumented objects, so changes to them can't sync back to the database unexpectedly

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5b3f57ee1)
            \
             N -- N -- N   refs/heads/db/set_tool_data_deinstrument (9997b74b1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Allura/allura/controllers/attachments.py           |   1 +
 Allura/allura/model/auth.py                        |  26 +-
 Allura/allura/model/filesystem.py                  |   4 +-
 .../allura/tests/functional/test_neighborhood.py   |  26 +-
 Allura/allura/tests/model/test_auth.py             |  31 ++-
 CLAUDE.md                                          | 305 +++++++++++++++++++++
 requirements.txt                                   |   6 +-
 ...field-encryption.sh => 037-field-encryption.sh} |  16 +-
 ...-cleanup.sh => 038-field-encryption-cleanup.sh} |  16 +-
 9 files changed, 373 insertions(+), 58 deletions(-)
 create mode 100644 CLAUDE.md
 copy scripts/migrations/{035-field-encryption.sh => 037-field-encryption.sh} (57%)
 copy scripts/migrations/{036-field-encryption-cleanup.sh => 038-field-encryption-cleanup.sh} (58%)


(allura) 01/01: get_tool_data should return ming-deinstrumented objects, so changes to them can't sync back to the database unexpectedly

Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch db/set_tool_data_deinstrument
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 9997b74b15dcd9b503d927341d4b9467f74e489d
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Jun 30 16:19:47 2026 -0400

    get_tool_data should return ming-deinstrumented objects, so changes to them can't sync back to the database unexpectedly
---
 Allura/allura/model/auth.py    |  6 +++++-
 Allura/allura/model/project.py | 12 ++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 1ee866005..6cd252f1b 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -792,7 +792,11 @@ def by_username(cls, name):
         return plugin.AuthenticationProvider.get(request).by_username(name)
 
     def get_tool_data(self, tool, key, default=None):
-        return self.tool_data.get(tool, {}).get(key, default)
+        result = self.tool_data.get(tool, {}).get(key, default)
+        if hasattr(result, '_deinstrument'):
+            return result._deinstrument()
+        else:
+            return result
 
     def set_tool_data(self, tool, **kw):
         d = self.tool_data.setdefault(tool, {})
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 5a6b672ab..cc0b722dc 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -345,7 +345,11 @@ def all_troves(self):
         return troves
 
     def get_tool_data(self, tool, key, default=None):
-        return self.tool_data.get(tool, {}).get(key, default)
+        result = self.tool_data.get(tool, {}).get(key, default)
+        if hasattr(result, '_deinstrument'):
+            return result._deinstrument()
+        else:
+            return result
 
     def set_tool_data(self, tool, **kw):
         d = self.tool_data.setdefault(tool, {})
@@ -1433,7 +1437,11 @@ def activity_name(self):
         return self.options.mount_label
 
     def get_tool_data(self, tool, key, default=None):
-        return self.tool_data.get(tool, {}).get(key, default)
+        result = self.tool_data.get(tool, {}).get(key, default)
+        if hasattr(result, '_deinstrument'):
+            return result._deinstrument()
+        else:
+            return result
 
     def set_tool_data(self, tool, **kw):
         d = self.tool_data.setdefault(tool, {})