gh-migration icon indicating copy to clipboard operation
gh-migration copied to clipboard

Replace the sendmail script

Open ezio-melotti opened this issue 4 years ago • 13 comments

The sendmail Roundup detector has been used to send mails to the new-bugs-announce mailing list and the python-bugs-list mailing list whenever a new issue was created or a new message posted respectively. The addresses are configured in the bugs.sls file.

  • [x] Find a replacement
  • [ ] Set up the replacement

ezio-melotti avatar Aug 15 '21 21:08 ezio-melotti

I do use these two services to keep up to date with libraries I care about and issues I'm involved with.

ethanfurman avatar Aug 23 '21 22:08 ethanfurman

I definitely use new-bugs-announce in my workflow.

warsaw avatar Aug 23 '21 23:08 warsaw

I also use new-bugs-announce in my workflow. It's how I know which new issues affect parts of the stdlib that I feel responsible for. I also use it for issues that don't relate to my code (so I'm not in CODEOWNERS), but where I can offer some help.

ericvsmith avatar Aug 24 '21 00:08 ericvsmith

Perhaps you can get information from the python.org mailman admin about how many users are subscribed to these lists. Posting in python-dev surely doesn't cover all users. Also be aware that the python-bugs mailing list is multiplexed into other forums, in particular to the gmane.comp.python.bugs newgroup provided by the news.gmane.io NNTP server which is how I usually access the list (and I do so regularly). By the nature of NNTP servers, it would likely be difficult to get an estimate of how many people read the list via that mechanism. (AFAIK, new-bugs-announce is not mirrored on gmane.) There are likely other ways to read the list on the web.

All that said, I could probably figure out a replacement workflow via GitHub notifications if needed but, as long as there is any activity on the existing Roundup-based b.p.o, I depend upon being able to see it.

ned-deily avatar Aug 26 '21 04:08 ned-deily

We (LLVM) were unable to find the ready replacement for this feature. So far we're thinking on utilizing the GitHub action that would trigger on new issue and send email to the mailing list. This is https://github.com/llvm/llvm-project/issues/52605

asl avatar Dec 15 '21 23:12 asl

Here is our solution: https://github.com/llvm/llvm-project/blob/main/.github/workflows/llvm-bugs.yml

asl avatar Dec 16 '21 21:12 asl

We have a mailgun account that's suitable as long as this will just be sending emails to distribution list on python.org!

Let me know what you need from me @ezio-melotti

ewdurbin avatar Apr 08 '22 17:04 ewdurbin

It seems the above workflow is ideal for new-bugs-announce, but I'd be very hesitant to implement a 1:1 send for the other list immediately. I'll get a PR set for the new-bugs-announce send now and add the credential for Mailgun so it can be merged when ready.

If someone else wants to consider how to handle feeding python-bugs-list, the Mailgun credential will be available :)

ewdurbin avatar Apr 08 '22 17:04 ewdurbin

See https://github.com/python/cpython/pull/32421, which should work after merge.

ewdurbin avatar Apr 08 '22 17:04 ewdurbin

I'm getting the new-bugs-announce messages now. Thanks!

Is there any way we can get the sender to include the user's name, like worked before. Right now I only see "CPython Issues".

What needs to be done to get python-bugs-list working again? (I already feel like I'm missing discussion on a number of issues that I was following but wasn't nosied. 😞)

ericsnowcurrently avatar Apr 13 '22 03:04 ericsnowcurrently

FWIW, I just got a mail from GitHub telling me that the workflow failed after I opened an issue:

https://github.com/python/cpython/issues/93249 https://github.com/python/cpython/runs/6606492855?check_suite_focus=true

Due to:

[Error: Bad Request] {
  status: 400,
  details: 'Send options (parameters starting with o:, h:, or v:) are limited to 16 kB total'
}

I suppose it should truncate long issue bodies (there's a big C stacktrace hidden in a <details> in there). Should I open a separate issue for this? If so, in this repo, or in the CPython one?

The-Compiler avatar May 26 '22 08:05 The-Compiler

Thanks for the report!

Should I open a separate issue for this? If so, in this repo, or in the CPython one?

A separate issue would be better, either in the CPython repo or in the core-workflow one.

ezio-melotti avatar May 26 '22 09:05 ezio-melotti

I'm getting the new-bugs-announce messages now. Thanks!

Is there any way we can get the sender to include the user's name, like worked before. Right now I only see "CPython Issues".

Not name, but something like this should work for username:

              const data = {
-               from: "CPython Issues <[email protected]>",
+               from: `${issue.data.login} <[email protected]>`,
                to: "[email protected]",
                subject: `[Issue ${issue.data.number}] ${issue.data.title}`,
                template: "new-github-issue",
                'o:tracking-clicks': 'no',
                'h:X-Mailgun-Variables': JSON.stringify(payload)
              };
              return mg.messages.create(DOMAIN, data)
            })
            .then(msg => console.log(msg));

We're already using issue.data.login in the payload:

              const payload = {
                author : issue.data.user.login,
                issue  : issue.data.number,
                title  : issue.data.title,
                url    : issue.data.html_url,
                labels : issue.data.labels.map(label => { return label.name }).join(", "),
                assignee : issue.data.assignees.map(assignee => { return assignee.login }),
                body   : issue.data.body
              };

Docs: https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#list-repository-issues

hugovk avatar Jan 09 '23 14:01 hugovk