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/06/25 16:52:47 UTC

(allura) branch db/solr_nones updated (ab558532a -> 8e104085e)

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

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


 discard ab558532a stringify some ids
 discard e0acd3bab don't pass sort=None etc to solr
     add 1f290c62b add docker/compose health checks and use --wait to check them
     new 2b55895aa get chained exception details into errormiddleware output
     new d1ccfecc7 don't pass sort=None etc to solr
     new 8e104085e stringify some ids

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   (ab558532a)
            \
             N -- N -- N   refs/heads/db/solr_nones (8e104085e)

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 3 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/lib/patches.py                 | 23 +++++++++++++++++++++--
 Allura/allura/lib/search.py                  |  2 +-
 Allura/docs/getting_started/installation.rst |  4 ++--
 Dockerfile                                   |  3 +++
 docker-compose-prod.yml                      | 13 ++++++++++++-
 docker-compose.yml                           | 14 ++++++++++++++
 scm_config/git-http/Dockerfile               |  5 ++++-
 scripts/jenkins-run.sh                       |  2 +-
 8 files changed, 58 insertions(+), 8 deletions(-)


(allura) 02/03: don't pass sort=None etc to solr

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/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git

commit d1ccfecc79b7d2cefc67a64c5be114b08f1c4be5
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Jun 24 17:11:21 2026 -0400

    don't pass sort=None etc to solr
---
 Allura/allura/lib/search.py | 6 +++++-
 Allura/allura/lib/solr.py   | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index b234a863b..375a09346 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -181,6 +181,10 @@ def search(q, short_timeout=False, ignore_errors=True, search_fn=None, **kw):
             search_fn = g.solr_short_timeout.search
         else:
             search_fn = g.solr.search
+
+    # don't pass through sort=None etc
+    kw = {k: v for k, v in kw.items() if v is not None}
+
     try:
         # try once with opportunity to retry
         try:
@@ -194,7 +198,7 @@ def search(q, short_timeout=False, ignore_errors=True, search_fn=None, **kw):
                 raise
     except (SolrError, OSError):
         # fatal error
-        log.exception('Error in solr search')
+        log.exception(f'Error in solr search: {q=} {kw=}')
         if not ignore_errors:
             raise SearchError('Error running search')
 
diff --git a/Allura/allura/lib/solr.py b/Allura/allura/lib/solr.py
index 68fddb3c6..b8f270a59 100644
--- a/Allura/allura/lib/solr.py
+++ b/Allura/allura/lib/solr.py
@@ -176,6 +176,9 @@ def commit(self):
         pass
 
     def search(self, q, fq=None, **kw):
+        for k, v in kw.items():
+            if v is None:
+                raise ValueError(f'{k}={v} passed to solr search')
         if q is None:
             q = ''  # shlex will hang on None
         # Parse query


(allura) 01/03: get chained exception details into errormiddleware output

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/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 2b55895aa4a57640d66d9e01f1e27ecadebfedaf
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Thu Jun 25 12:47:10 2026 -0400

    get chained exception details into errormiddleware output
---
 Allura/allura/lib/patches.py | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/lib/patches.py b/Allura/allura/lib/patches.py
index 27732184f..ffad48a00 100644
--- a/Allura/allura/lib/patches.py
+++ b/Allura/allura/lib/patches.py
@@ -15,13 +15,14 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
-import functools
+import sys
+import traceback
 
 import webob
 import tg.decorators
 from decorator import decorator
 from tg import request
-import pygments.plugin
+import paste.exceptions
 
 from allura.lib import helpers as h
 
@@ -94,6 +95,24 @@ def with_trailing_slash(func, *args, **kwargs):
             raise webob.exc.HTTPMovedPermanently(location=location)
         return func(*args, **kwargs)
 
+    orig_Supplement_extraData = paste.exceptions.errormiddleware.Supplement.extraData
+
+    # add py3 chained exceptions into paste ErrorMiddleware output
+    @h.monkeypatch(paste.exceptions.errormiddleware.Supplement)
+    def extraData(*a, **kw):
+        data = orig_Supplement_extraData(*a, **kw)
+
+        curr_exc: BaseException = sys.exc_info()[1]
+        prev_exc: BaseException = getattr(curr_exc, '__context__', None)
+        # TODO this chains use "raise .. from None"  How to detect that?  __suppress_context__ isn't an indicator
+        if prev_exc:
+            # ErrorMiddleware formatters will take this 'extra' stuff and put it into the output
+            data[('extra', '\nChained Exception')] = '\n' + ''.join(
+                traceback.format_exception(type(prev_exc), prev_exc, prev_exc.__traceback__)
+            )
+
+        return data
+
     # http://blog.watchfire.com/wfblog/2011/10/json-based-xss-exploitation.html
     # change < to its unicode escape when rendering JSON out of turbogears
     # This is to avoid IE9 and earlier, which don't know the json content type


(allura) 03/03: stringify some ids

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/solr_nones
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 8e104085e7a395abfb4eb7ed6efddd32ef11553d
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Jun 24 17:11:30 2026 -0400

    stringify some ids
---
 Allura/allura/model/artifact.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 5c7093691..761f49f01 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -825,7 +825,7 @@ class __mongometa__:
     def index(self):
         result = Artifact.index(self)
         result.update(
-            _id_s=self._id,
+            _id_s=str(self._id),
             short_s=self.short,
             timestamp_dt=self.timestamp,
             full_s=self.full)
@@ -875,7 +875,7 @@ class __mongometa__:
     def index(self):
         result = Artifact.index(self)
         result.update(
-            _id_s=self._id,
+            _id_s=str(self._id),
             short_s=self.short,
             timestamp_dt=self.timestamp,
             full_s=self.full)