-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
email: update cc list to enable multiple recipients #63
base: main
Are you sure you want to change the base?
Conversation
Actually, I was getting an error with just one email. Further below From my change on this LOC: for to in to_list + cc_list: I was getting an error about concatenating a list and a string. The to_list Was clearly a list based on how it was processed just above the for loop. The cc_list printed its type as a list but it looked like a string logging it. Either way, single or multiple entry cc in the config file, this patch works. Signed-off-by: Paul Luse <[email protected]>
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks @peluse . Are you passing a list to the The former is expected and looking at your patch, I feel we should rather raise in
if either isinstance(smtp_to, list) or isinstance(smtp_cc, list) is False.
so the message is clear has to why this is failing, and we don't have to deal with a mix of list or comma-separated list in the rest of the code. |
Yeah for reference the email config should look something like this: "email": {
"host": <REDACTED>
"port": <REDACTED>
"user": "bot-bpf-ci",
"from": "[email protected]",
"cc": [
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
],
"pass": <REDACTED>
"http_proxy": <REDACTED>
"submitter_allowlist": [
".*"
],
"ignore_allowlist": false
}, I'd check that you're passing the right json thingy into We should probably follow up with better documentation if we don't have that already. |
Totally. I was mentioning to @theihor to update the documentation has he goes through setting his own testing repository. Tests are currently failing for some other reasons (a revert should make it to main soon), but this got caught in our internal CI with:
|
The type checker (which I don't think we run here either, and probably should follow up) caught it too:
|
thanks guys! sorry was off for the last week. I was not using the format mentioned above and didn't see any examples so I was just putting one email address in there in quotes and it didn't work. Looking at what you suggest surely looks like it will work. I will test it out very soon and close this PR when it works ;) |
Actually, I was getting an error with just one email. Further below From my change on this LOC:
I was getting an error about concatenating a list and a string. The to_list Was clearly a list based on how it was processed just above the for loop.
The cc_list printed its type as a list but it looked like a string logging it.
Either way, single or multiple entry cc in the config file, this patch works.