public inbox for [email protected]  
help / color / mirror / Atom feed
From: Célestin Matte <[email protected]>
To: [email protected]
Subject: Re: [PATCH] pgarchives: Bugfix: allow message's parentid to be null
Date: Tue, 26 Oct 2021 20:31:46 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Attached: associated migration

On 25/10/2021 16:52, Célestin Matte wrote:
> Hello,
> 
> Upon execution of load_messages.py, when creating a new thread, I get a crash:
> (Sorry about the format, I get this out of strace)
> 
> Traceback (most recent call last):\n  File \"/srv/pgarchives/local/loader/load_message.py\", lin\
> e 174, in <module>\n    ap.store(conn, listid, opt.overwrite, opt.overwrite)\n  File \"/srv/pgarchives/local/loader/li\
> b/storage.py\", line 232, in store\n    'rawtxt': bytearray(self.rawtxt),\npsycopg2.errors.NotNullViolation: null valu\
> e in column \"parentid\" violates not-null constraint\nDETAIL:  Failing row contains (2, 2, cmatte <cmatte@[my_domain]\
> .tld>, helloworld@[my_pglister_domain], , Test archive after redeployment 2, 2021-10-25 14:13:32+00, 1635171212.3\
> 49997.1068459.nullmailer@[my_domain], hello world\n\n\n\n, null, f, null, \\x46726f6d2068656c6c6f776f726c642d6f776\
> e65722b617263686976654062..., '2':5A 'after':3A 'archive':2A 'hello':6 'redeployment':4A 'test...).\n\n
> 
> I think the way to fix this is simply to allow message.parentid to be null.
> 
> Cheers,
> 


-- 
Célestin Matte

Attachments:

  [text/x-patch] 0002-Add-migration-associated-with-ba3852df-allow-parenti.patch (1.1K, 2-0002-Add-migration-associated-with-ba3852df-allow-parenti.patch)
  download | inline diff:
From 9049a67567c568ee3a35217ee620d40cb567d8ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <[email protected]>
Date: Tue, 26 Oct 2021 20:29:58 +0200
Subject: [PATCH 2/2] Add migration associated with ba3852df (allow parentid to
 be null)

---
 .../migrations/0005_auto_20211026_1827.py      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 django/archives/mailarchives/migrations/0005_auto_20211026_1827.py

diff --git a/django/archives/mailarchives/migrations/0005_auto_20211026_1827.py b/django/archives/mailarchives/migrations/0005_auto_20211026_1827.py
new file mode 100644
index 0000000..95e81ed
--- /dev/null
+++ b/django/archives/mailarchives/migrations/0005_auto_20211026_1827.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.24 on 2021-10-26 18:27
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('mailarchives', '0004_resend_rate_limit'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='message',
+            name='parentid',
+            field=models.IntegerField(null=True),
+        ),
+    ]
-- 
2.33.1



view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] pgarchives: Bugfix: allow message's parentid to be null
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox