Skip to content

Notify maintainers when dependency is out of range #1168

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 12 commits into from
May 13, 2023
Merged

Notify maintainers when dependency is out of range #1168

merged 12 commits into from
May 13, 2023

Conversation

ysangkok
Copy link
Member

@ysangkok ysangkok commented Jan 26, 2023

Tested by:

  1. lowering limits as explained in UserNotify.hs to 1 minute
  2. installing postfix, configuring it for "Localhost delivery only" and changing my Hackage user's email to [email protected]
  3. enable the notification on the preferences page, opt in to notifications
  4. uploading transformers-0.5.6.2 (with patches to fix stricter cabal file validation)
  5. uploading servant-0.19.1 (which doesn't accept transformers-0.6)
  6. uploading transformers-0.6.0.6
  7. after a minute, verified using mail(1) from the package bsd-mailx that the mail was delivered and the link works

@mitchellwrosen
Copy link
Contributor

This would be an awesome feature! 🎉

toNotify <- traverse maintainersToNotify revDepNames
pure $
Map.fromList
[ ( maintainerId

Choose a reason for hiding this comment

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

What happens here if multiple packages by the same maintainer are affected by the same release? Ideally, I think the maintainer should get a single notification with a list of those packages.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I have pushed a commit which groups by userId and packageId. Now the email looks like this:

The dependency transformers-0.6.0.2 has been updated.

You have requested to be notified when a dependency isn't accepted by any of your maintained packages.

These are your packages that require transformers but don't accept 0.6.0.2:

servant-0.19.1

You can adjust your notification preferences at

http://gorm.local:8080/user/admin/notify

@andreasabel andreasabel requested a review from gbaz February 26, 2023 17:54
@andreasabel andreasabel added component: upload re: notifications Concerning notifications sent to Hackage users labels Feb 26, 2023
@gbaz
Copy link
Contributor

gbaz commented Apr 22, 2023

@peterbecich any thoughts on why the nix flake test is consistently failing?

This test is identical to the second of the assertEquals.
@ulysses4ever
Copy link
Contributor

RE nix failure: it's due to Cabal update which didn't take into account the nix setup (#1186). I tried to fix it (ulysses4ever@aa00808) but bumped into a test suite failure (https://github.com/ulysses4ever/hackage-server/actions/runs/4682410347/jobs/8296230988) and i didn't go as far as figuring what's the best way to handle it (e.g. one could probably disable the tests).

@peterbecich
Copy link
Member

Will look at the Nix error later today. Have you tried nix flake update? Thanks

@peterbecich
Copy link
Member

peterbecich commented Apr 22, 2023

Attempting to fix: #1201 seems to have worked

@ysangkok
Copy link
Member Author

@gbaz I have now double checked everything and I think this is ready for merging!

@gbaz gbaz merged commit bc194a3 into haskell:master May 13, 2023
@ysangkok ysangkok deleted the janus/notify-dep-out-of-range branch May 14, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: upload re: notifications Concerning notifications sent to Hackage users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants