mozilla-services / updatebot

Automation for updating third party libraries for Firefox
Mozilla Public License 2.0
8 stars 5 forks source link

Add table for third-party libraries in database #294

Closed nathan-barrett closed 1 year ago

nathan-barrett commented 1 year ago

Description

At the moment, I don't think its possible to query the updatebot db for all libraries that currently have outstanding jobs (but each job has a field for it's library). This would allow the homepage of updatebot-frontend's homepage to render a table of all third-party libraries in firefox.

Also - not sure if updatebot-frontend should list all third-party libraries or just libraries that are vendored through updatebot

Success Criteria

tomrittervg commented 1 year ago

So it's critical that a new library can be added and processed by Updatebot just by creating a moz.yaml in m-c with the correct fields.

If all you need is "Give me a list of the libraries Updatebot has ever run a job for" you can do that with SELECT DISTINCT library FROM jobs, and if you want ones with outstanding jobs, add a WHERE outcome NOT IN (4,5).

If you need additional metadata about a library (such as that contained in the moz.yaml, then yeah, we might need a jobs table and we could populate it with a new library when Updatebot sees one, but if there isn't a pressing need for that I'm inclined to omit it. (Could make a view though... if MySQL has those...)

As far as listing all third party libraries.... that would presume we have a list of all the third party libraries in m-c. =p We might be able to get 80-90% of the way there, but I'm not sure the goal of that (especially initially.)

nathan-barrett commented 1 year ago

If all you need is "Give me a list of the libraries Updatebot has ever run a job for" you can do that with SELECT DISTINCT library FROM jobs, and if you want ones with outstanding jobs, add a WHERE outcome NOT IN (4,5).

That makes sense!

If you need additional metadata about a library...

I guess the needs for additional library metadata would be for whatever the requirements would be for the front-end homepage? @bayounetta

As far as listing all third party libraries....

As above, this would only be needed if we want to list all third-party libraries on the front-end.

bayounetta commented 1 year ago

Having updatebot copy a few bits of information from the moz.yaml into the database for the frontend to later utilize might be helpful for displaying things like a link to the upstream commit, specific vendoring rules, maintainers, etc. If we'd rather not copy this over from moz.yaml files into the db every updatebot run then we should be able to get away with just Tom's SQL statement.

And yeah, as far as what libraries should be displayed on the front-end it should just be the list of libraries updatebot knows about and has placed jobs in the database for