Re: tracker does not want to send mail

Ed Trumbull <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <PH7PR12MB56569639FD57CF361F52DFFB844D9@PH7PR12MB5656.namprd12.prod.outlook.com>
Thank you both for your help.
I suspect that I buggered up my initial setup somehow, so I have punted trying to get that tracker running, and am restarting.
I appreciate the time you spent helping me, and apologize for wasting your time.

________________________________
From: [email protected] <[email protected]> on behalf of John P. Rouillard <[email protected]>
Sent: Monday, September 19, 2022 12:45 PM
To: Ralf Schlatterbeck <[email protected]>
Cc: Ed Trumbull <[email protected]>; [email protected] <[email protected]>
Subject: Re: [Roundup-users] tracker does not want to send mail

Hi Ed and Ralf:

In message <[email protected]>,
Ralf Schlatterbeck writes:
>On Mon, Sep 19, 2022 at 12:41:24PM +0000, Ed Trumbull wrote:
>> The tracker runs as user "roundup"
>> roundup   332945       1  0 Sep16 ?        00:00:30 /usr/bin/python3 /usr/local/bin/roundup-server -C /local/data/roundup/as2it/as2it-server.ini
>>
>>
>> Permissions in the detectors directory are:
>> roundup@admin-00:/local/data/roundup/as2it/detectors$ ls -la
>[...]
>
>Hmm. That looks perfectly fine.

Agreed.

>And still it looks like the nosyreaction is not called at all.

The only thing I can think of is a bad cached copy of the file in
__pycache__. Ed can you shut down the server and remove the
__pycache__ subdirectory then restart the server and try updating a
ticket with two users on the nosy list.

>John, do you have any idea what's going wrong here?
>I've never seen this so far.

I'm stumped as well. I have nosymessages logging to a file) with no
issues.  The bad cache file is the only idea I have at the moment.

Ed can you do a:

  sum nosyreaction.py

and give us the result. Just to make sure you have a valid file and so
I can test wth that same file.

>The next step I'd suggest is to start the roundup-server in the
>debugger:

The code Ralf sugests will invoke the debugger when you get into
nosymessage.py. You don't run:

  python -m pdb .../roundup-server,

just start roundup-server normally.

>Add the line
>   import pdb; pdb.set_trace()
>into the function 'nosyreaction' in detectors/nosyreaction.py around
>line 37 just before the loop
>'for msgid in determineNewMessages(cl, nodeid, oldvalues):'
>You want the indentation to match with the for loop.

So it will look like:

    # send a copy of all new messages to the nosy list
    import pdb; pdb.set_trace()
    for msgid in determineNewMessages(cl, nodeid, oldvalues):

note that the indent should be done using spaces not tabs.

>Then when you start the roundup-server and create a message for an
>issue, roundup-server should stop at that line in the debugger.
>If it doesn't then the nosyreaction isn't called at all.

>if it does stop there you can single-step through that function using
>the command 'n' (next). You can print variables or expressions using
>'p <expression>'. You can quit the debugger with 'q' and remove the
>instrumentation from the file nosyreaction.py

when it stops you will get a prompt:

  (Pdb)

if you type l (list), you will see the following:

(Pdb) l
 54             # or cli based change.
 55             pass
 56
 57         # send a copy of all new messages to the nosy list
 58         import pdb; pdb.set_trace()
 59  ->     for msgid in determineNewMessages(cl, nodeid, oldvalues):
 60             try:
 61                 # get a message ID and type
 62                 messages = cl.db.msg
 63                 ccString = messages.get(msgid, 'cc')
 64                 msgTypeID = messages.get(msgid, "messagetype")

you can then run:

(Pdb) determineNewMessages(cl, nodeid, oldvalues)
['644']

and you should see the id of the new message.

typing 'n' should move you to the next line. When you get to:

 cl.nosymessage(nodeid, msgid, oldvalues)

type s to step into the function. Then type n (and use l) until you
reach code that looks like:

        # possibly send the message to the author, as long as they aren't
        # anonymous
        if (good_recipient(authid) and
            (self.db.config.MESSAGES_TO_AUTHOR == 'yes' or
             (self.db.config.MESSAGES_TO_AUTHOR == 'new' and not oldvalues) or
             (self.db.config.MESSAGES_TO_AUTHOR == 'nosy' and authid in
              self.get(issueid, whichnosy)))):
            add_recipient(authid, sendto)

when you get to that line, use:

(Pdb) p authid

((Pdb) is the prompt and should not be typed) and then run:

(Pdb) p good_recipient(authid)

and lastly:

(Pdb) p self.db.config.MESSAGES_TO_AUTHOR

then type n and you should end up at:

   add_recipient(authid, sendto)

this is the code that adds the author to the To list for the email.

If you don't end up at the line add_recipient, at the (Pdb) prompt run:

     add_recipient(authid, sendto)

this should trigger some output in your mail log file.

typing n again will walk you down to the loop that will process your
second nosy person.

When you are tired of stepping through the code, you can type c to
continue and roundup-server will run to completion and your browser
window should finish loading.

This is an unusual problem. Thanks for helping us figure this out.

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.