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
Notification: New Package Available #542
Comments
For FreshPorts to tell you that a new package is available for something on your watch list, the following needs to exist (what follows is mostly notes for myself)
I think a report can be generated from the existing data without database modification.
|
This new feature requires careful consideration. I've been thinking about it over the past few days. We need to define 'new package'. It is not enough that a new repo build is available (I'll also refer to that as a 'new build', 'import', or 'repo' - they all mean the same thing). We have that information already. The user does not want to be notified that a new build is available. They don't care if it's the same version as the last build. "Hey, user, foo-1.3 has just been built" is not useful if you have I think the objective is knowing that the package version/revision has been modified. That sounds like a trigger to me (the trigger would add that port to a list). As a new repo build is imported into FreshPorts, the triggers will build list of 'new package' instances. After the import is done, emails will go out. I see 'new package' notifications should go out immediately upon the above import. Why?
If a user is watching multiple ABI, they might get multiple emails per day. If they are watching just one ABI, they'll get at most one email per new. |
NOTES on table structures:
The latest import for (see https://www.postgresql.org/docs/current/sql-select.html#SQL-DISTINCT)
The current idea for a table:
Subscriptions to a particular ABI are noted through this table:
Adding the new report to the database:
During a walk last night, this idea came to mind: Add three more columns to the
Testing data:
|
This is the user-interface idea I had last night:
|
Here's some content: full listing at https://gist.github.com/dlangille/80e4b7169ac5d6c5d9cc2e9941f4b223
|
HTML as it stands now: https://gist.github.com/dlangille/9a8539c8edeb04a86046bfd5ba57692f |
And here we have the first entry in the subscription table:
|
So, how do I test this, now that I have data and a subscription method. I work in reverse. Here's a list of 10 new packages. The original query is above
I'm going to add several of those ports to a watch list. Then subscribe to Oh I see a flaw in my UI. I don't have |
Here I am, with those three ports on a watch lists (named |
Next, write a query which combines these tables:
|
Let's start with the report notifications query and go from there. This is in
|
Here's is my first draft, and it's super fast. It runs in 0.112s
|
Next, add this query to a new script, and create the outgoing email. |
So here's the first email, and I have yet to figure out why it has duplicated information.
|
Here we go. This is looking sane.
|
Next: Invoke that script after processing a package import. |
The notification email now handles
|
This remains the next step. FYI: this is babysitting week. The two monsters are in 'school' right now. Time for a shower. |
Now we wait for the next built repo.
|
This new feature is now available on |
This work has been merged into |
Currently Freshports can send out email notifications when there are changes to ports on your watch lists but there are cases where the ports don't make it into the actual repo for up to a week or more. I think it would be nice if you could instead set it to monitor the actual ABI repository (eg. FreeBSD:13:amd64, FreeBSD:14:amd64, etc) and get email notifications when there are changes there.
The text was updated successfully, but these errors were encountered: