As we've done for the Patch model, this change prevents database errors
from duplicate Comments.
Signed-off-by: Jeremy Kerr
---
patchwork/parser.py| 6 +++---
patchwork/tests/test_parser.py | 12
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git
Test that we get the correct DuplicateMailError from parsing the same
mail twice.
Signed-off-by: Jeremy Kerr
---
patchwork/tests/test_parser.py | 27 +++
1 file changed, 27 insertions(+)
diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py
index
Currently, the parser causes IntegrityErrors while inserting duplicate
patches; these tend to pollute database logs.
This change adds a check, which currently fails, to ensure we do not
cause errors during a duplicate patch parse.
Signed-off-by: Jeremy Kerr
---
patchwork/tests/test_parser.py |
Currently, the parser relies on causing (and catching) IntegrityErrors
on patch insert to catch duplicate (msgid,project) mails.
This change performs an atomic select -> insert instead.
Signed-off-by: Jeremy Kerr
---
patchwork/parser.py | 7 ---
1 file changed, 4 insertions(+), 3
On patchwork.ozlabs.org, we see a lot of noise in the postgres logs, due
to INSERTs with duplicate values for (project,msgid) keys. Patchwork's
strategy for catching the resulting IntegrityError means that each of
these is logged.
Instead, this change moves to an atomic select -> insert for the
As we've done for the Patch and Comment models, this change prevents
database errors from duplicate CoverLetters.
Signed-off-by: Jeremy Kerr
---
patchwork/parser.py| 7 ---
patchwork/tests/test_parser.py | 10 ++
2 files changed, 14 insertions(+), 3 deletions(-)
diff
get_original_sender() tries to demangle DMARC-mangled From headers, in
the case where the email's From address is the list address. It knows how
to handle Google Groups and Mailman style mangling, where the original
submitter's name will be turned into e.g. "Andrew Donnellan via
linuxppc-dev".
If