You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/28 21:45:01 UTC
[incubator-ponymail-foal] branch master updated (8c5aa1c -> a40fa67)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 8c5aa1c Bump version
new 1ad478f Ensure changes are flushed for testing
new a40fa67 Bump server version
The 2 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:
server/endpoints/mgmt.py | 20 ++++++++++++--------
server/server_version.py | 2 +-
2 files changed, 13 insertions(+), 9 deletions(-)
[incubator-ponymail-foal] 01/02: Ensure changes are flushed for testing
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 1ad478fdca6f9f66ac192941082995d83b965b9d
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jan 28 21:44:26 2022 +0000
Ensure changes are flushed for testing
---
server/endpoints/mgmt.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/server/endpoints/mgmt.py b/server/endpoints/mgmt.py
index 7a4b143..61bcf5f 100644
--- a/server/endpoints/mgmt.py
+++ b/server/endpoints/mgmt.py
@@ -24,6 +24,10 @@ import plugins.auditlog
import typing
import aiohttp.web
+# N.B. the update/delete database operations are performed with the setting refresh='wait_for'
+# This is was done to make testing easier.
+# There are very few such changes so this should not affect performance unduly
+
async def process(
server: plugins.server.BaseServer, session: plugins.session.SessionObject, indata: dict,
@@ -59,15 +63,15 @@ async def process(
del email["id"]
if server.config.ui.fully_delete and email["mid"] and email["dbid"]: # Full on GDPR blast?
await session.database.delete(
- index=session.database.dbs.db_mbox, id=email["mid"],
+ index=session.database.dbs.db_mbox, id=email["mid"], refresh='wait_for',
)
await session.database.delete(
- index=session.database.dbs.db_source, id=email["dbid"],
+ index=session.database.dbs.db_source, id=email["dbid"], refresh='wait_for',
)
else: # Standard behavior: hide the email from everyone.
email["deleted"] = True
await session.database.update(
- index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"],
+ index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"], refresh='wait_for',
)
lid = email.get("list_raw", "??")
await plugins.auditlog.add_entry(session, action="delete", target=doc, lid=lid, log=f"Removed email {doc} from {lid} archives")
@@ -84,7 +88,7 @@ async def process(
del email["id"]
email["deleted"] = True
await session.database.update(
- index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"],
+ index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"], refresh='wait_for',
)
lid = email.get("list_raw", "??")
await plugins.auditlog.add_entry(session, action="hide", target=doc, lid=lid, log=f"Hid email {doc} from {lid} archives")
@@ -101,7 +105,7 @@ async def process(
del email["id"]
email["deleted"] = False
await session.database.update(
- index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"],
+ index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"], refresh='wait_for',
)
lid = email.get("list_raw", "??")
await plugins.auditlog.add_entry(session, action="unhide", target=doc, lid=lid, log=f"Unhid email {doc} from {lid} archives")
@@ -123,7 +127,7 @@ async def process(
if attachment and isinstance(attachment, dict):
await session.database.delete(
- index=session.database.dbs.db_attachment, id=attachment["_id"],
+ index=session.database.dbs.db_attachment, id=attachment["_id"], refresh='wait_for',
)
lid = "<system>"
await plugins.auditlog.add_entry(session, action="delatt", target=doc, lid=lid, log=f"Removed attachment {doc} from the archives")
@@ -178,7 +182,7 @@ async def process(
if "id" in email: # id is not a valid property for mbox
del email["id"]
await session.database.update(
- index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"],
+ index=session.database.dbs.db_mbox, body={"doc": email}, id=email["mid"], refresh='wait_for',
)
# Fetch source, mark as deleted (modified) and save IF anything but just privacy changed
@@ -190,7 +194,7 @@ async def process(
source = source["_source"]
source["deleted"] = True
await session.database.update(
- index=session.database.dbs.db_source, body={"doc": source}, id=docid,
+ index=session.database.dbs.db_source, body={"doc": source}, id=docid, refresh='wait_for',
)
await plugins.auditlog.add_entry(session, action="edit", target=doc, lid=lid,
[incubator-ponymail-foal] 02/02: Bump server version
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit a40fa671afea5c973ce29f8059eff839fbfbf9bc
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jan 28 21:44:49 2022 +0000
Bump server version
---
server/server_version.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/server_version.py b/server/server_version.py
index 65fa43d..48b1274 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
# This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = '6efabb8'
+PONYMAIL_SERVER_VERSION = '1ad478f'