Skip to content

Add email notification on project/release removal #7071

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

Merged
merged 3 commits into from
Mar 3, 2020

Conversation

MVrachev
Copy link
Contributor

@MVrachev MVrachev commented Dec 9, 2019

Until now, when there are multiple contributors on a single
the project, if one of them deletes a release or the whole
project the other contributors don't get any notification,
which is problematic.

Connected with issue #5714

Signed-off-by: Martin Vrachev [email protected]

@MVrachev MVrachev force-pushed the remove-email-templates branch 2 times, most recently from 217a29b to 9a22e56 Compare December 9, 2019 16:47
@di
Copy link
Member

di commented Dec 9, 2019

Hi @MVrachev, is this still a WIP? I don't see any changes here that actually use these new templates.

@MVrachev
Copy link
Contributor Author

I consciously split the implementation of the issue #5714 into multiple pull requests.

Here I wanted to discuss with you the text in the templates themselves because it's my first time using Jinjra2.

There will be another pull request which will use those templates.

@di
Copy link
Member

di commented Dec 10, 2019

Thanks for the explanation. Let's keep everything in one pull request, the maintainers have limited bandwidth and it's easier for us to review a single feature-complete PR.

If you have any questions about the implementation, feel free to ask in #5714.

@MVrachev MVrachev changed the title Add templates of removal of a pkg/pkg release [WIP] Add email notification feature on removal Dec 11, 2019
@MVrachev MVrachev force-pushed the remove-email-templates branch from 9a22e56 to f82fdec Compare January 15, 2020 18:33
@MVrachev MVrachev changed the title [WIP] Add email notification feature on removal Add email notification on package/release removal Jan 15, 2020
@MVrachev
Copy link
Contributor Author

@di I have updated my pull request with the code using it.
I tested it for both package removal and package release removal.

@MVrachev MVrachev force-pushed the remove-email-templates branch from f82fdec to db8ce96 Compare January 15, 2020 18:46
@di di self-requested a review January 15, 2020 18:46
@MVrachev
Copy link
Contributor Author

I will fix the issues with the CI these days and you can have a look again.

@MVrachev MVrachev force-pushed the remove-email-templates branch 2 times, most recently from 449418d to 04c437e Compare February 1, 2020 13:40
@MVrachev
Copy link
Contributor Author

MVrachev commented Feb 1, 2020

@di I updated the unit tests in the pr.

The tests I touched are not failing but some others do, but it seems they are failing in the master branch too.

I think the pr is ready for a review. It's complete.

@di di requested a review from ewdurbin February 7, 2020 23:10
Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MVrachev! Thanks for your contribution.

Overall I think this looks great. The main theme is avoiding the word "package" in the code and templates in favor of "project" to maintain consistency with our terminology. I didn't point out every instance to keep from overwhelming the review.

@MVrachev
Copy link
Contributor Author

I addressed your feedback @ewdurbin.

I was wondering what word should I use when there is a deletion of a particular release file in a project.
Should I call it removed_package because according to https://pypi.org/help/#packages:

A "file", also known as a "package", on PyPI is something that you can download and install. Because of different hardware, operating systems, and file formats, a release may have several files (packages), like an archive containing source code or a binary wheel.

@MVrachev MVrachev force-pushed the remove-email-templates branch from 7a0ea1f to 9d33268 Compare February 10, 2020 18:08
@MVrachev MVrachev changed the title Add email notification on package/release removal Add email notification on project/release removal Feb 10, 2020
@ewdurbin ewdurbin self-requested a review February 11, 2020 20:22
@ewdurbin
Copy link
Member

I addressed your feedback @ewdurbin.

I was wondering what word should I use when there is a deletion of a particular release file in a project.
Should I call it removed_package because according to https://pypi.org/help/#packages:

A "file", also known as a "package", on PyPI is something that you can download and install. Because of different hardware, operating systems, and file formats, a release may have several files (packages), like an archive containing source code or a binary wheel.

Thanks for those changes @MVrachev!

This question actually does stir up the fact that we're only notifying if a Project or Release as whole is removed.

If notification for single file removal is added (which is probably a good idea), I'd suggest that we use something along the lines of:

send_removed_release_file_email or send_removed_file_email. At the verbose extreme... send_removed_project_release_file_email works... as it follows the whole "chain" down (Projects hold Releases, Releases hold Files).

I'm mostly sticking to the names that we use within the codebase/schema; see Project, Release, and File.

Overall, package is just kind of a messy term. If anything this nudges me to consider working to shore up that FAQ entry :)

@MVrachev MVrachev force-pushed the remove-email-templates branch 2 times, most recently from e62d613 to 18637f1 Compare February 18, 2020 13:50
@MVrachev
Copy link
Contributor Author

Are there other changes required you want me to do @ewdurbin ?
If not, can we merge this because I want to continue my work on issue #5714 and add email notifications when:

  • Send a email notification to all collaborators when a file from a version is deleted.
  • Send a email notification to all collaborators when new version of the package is uploaded.

@ewdurbin
Copy link
Member

ewdurbin commented Feb 18, 2020

It looks like there are some issues with test coverage and linting, once those are resolved this is good to go, thanks @MVrachev

@MVrachev MVrachev force-pushed the remove-email-templates branch from 18637f1 to d2666d6 Compare February 25, 2020 15:32
@MVrachev MVrachev force-pushed the remove-email-templates branch 2 times, most recently from 6346caf to 689a99d Compare February 25, 2020 15:39
@MVrachev
Copy link
Contributor Author

@ewdurbin you were right.
Sorry that I didn't looked at that in the first place before asking for a review.

I have added multiple new unit tests in order to increase the code coverage and during that process I found some small bugs and problems.

I think it requires a new look at the new changes. I made a new commit with them.

@MVrachev MVrachev force-pushed the remove-email-templates branch 2 times, most recently from 521b2cf to 4dd3334 Compare February 28, 2020 16:42
@MVrachev
Copy link
Contributor Author

I have changed the role of the submitter to "owner" for send_removed_project_email and send_removed_project_release_email and now Travis CI blocks because of the lack of translations.

What I am suppose to do?

MVrachev added 2 commits March 3, 2020 13:02
Until now, where there are multiple contributors on a single
the project, if one of them deletes a release or the whole
project the other contributors don't get any notification,
which is problematic.

Connected with issue pypi#5714.

Signed-off-by: Martin Vrachev <[email protected]>
@MVrachev MVrachev force-pushed the remove-email-templates branch from 2cc2f50 to 94851a9 Compare March 3, 2020 13:40
@MVrachev MVrachev force-pushed the remove-email-templates branch from 94851a9 to 0fadd33 Compare March 3, 2020 13:44
@MVrachev
Copy link
Contributor Author

MVrachev commented Mar 3, 2020

I fixed the translations issues.
I don't plan any new changes on that pr, but I think that maybe it's a good idea for a new review because of some recent changes.

@ewdurbin
Copy link
Member

ewdurbin commented Mar 3, 2020

Thank you @MVrachev!

@ewdurbin ewdurbin merged commit 64b910f into pypi:master Mar 3, 2020
ewdurbin added a commit that referenced this pull request Mar 3, 2020
ewdurbin added a commit that referenced this pull request Mar 3, 2020
@MVrachev MVrachev deleted the remove-email-templates branch March 4, 2020 11:31
@monperrus
Copy link

Hi all,
I'd like to receive emails for each release, but it's unclear what else I should add in pyproject.toml

[project]
name = "crawler-user-agents"

authors = [
  { name="Martin Monperrus", email="[email protected]" },
]

Any help would be appreciated, thanks!

@di
Copy link
Member

di commented Aug 16, 2024

Hi, emails are sent to user accounts on PyPI, not addresses listed in project metadata. Hope that helps!

@monperrus
Copy link

Thanks @di for the clarification.

Are emails sent for removals only? Or can they also be sent for normal releases? (NPM does this and it's super useful)

@di
Copy link
Member

di commented Aug 17, 2024

See #13234.

@monperrus
Copy link

monperrus commented Aug 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants