Skip to content
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

Buildinfo since endpoint #54

Closed

Conversation

Foxboron
Copy link

@Foxboron Foxboron commented Nov 1, 2018

Implements a endpoint returning a list of buildinfo files since a given
date given in Unix time.

Example: GET /api/buildinfo/since/0

Signed-off-by: Morten Linderud morten@linderud.pw

Implements a endpoint returning a list of buildinfo files since a given
date given in Unix time.

Example: GET /api/buildinfo/since/0

Signed-off-by: Morten Linderud <morten@linderud.pw>
@kpcyrd
Copy link

kpcyrd commented Nov 1, 2018

Random thought, but it might be a good idea to:

  • limit the number of buildinfo files returned (eg 100, oldest first)
  • return the timestamps of the database entries as well

That would allow me to start at a low number without overloading the database and then slowly walk through all pages until an empty list is returned, then poll every hour until new entries are returned.

@lamby
Copy link
Owner

lamby commented Nov 1, 2018

What is the use-case here? You want to know about new buildinfo files? If so, there are surely better ways of doing this than polling.

@kpcyrd
Copy link

kpcyrd commented Nov 1, 2018

This is needed for #48, which was filed for https://salsa.debian.org/reproducible-builds/debian-rebuilder-setup/tree/integrate-srebuild

buildinfo.debian.net pushing the info to us, the rebuilder, would work as well but that would require coordination with you to run a rebuilder. Ideally, anybody who wants to run a rebuilder should be able to get that data without having to coordinate anything.

Something like server-sent-events or websockets would technically avoid polling as well, but require more work from both sides. :)

@lamby
Copy link
Owner

lamby commented Nov 1, 2018

(As an aside, can I request bidbbuildinfo.debian.net. Latter is the proper service name that others will understand but the former is "just" the Python module name.)

@lamby lamby changed the title First revision of buildinfo since endpoint Buildinfo since endpoint Nov 1, 2018
@lamby
Copy link
Owner

lamby commented Nov 1, 2018

(Dropped "first revision of" prefix)

Adds a created-since field to the api response, filters by gte (so as to
avoid microsecond time drift) and sorts the results.
@SantiagoTorres
Copy link

@Foxboron please take a look at Foxboron#1 to address soem of the remaining issues...

@h01ger
Copy link

h01ger commented Dec 13, 2018

ping, Foxboron and kpcyrd would be very happy to get this merged :)

bidb/api/views.py Outdated Show resolved Hide resolved
bidb/api/urls.py Outdated Show resolved Hide resolved
bidb/api/views.py Outdated Show resolved Hide resolved
bidb/api/views.py Outdated Show resolved Hide resolved
bidb/api/views.py Show resolved Hide resolved
bidb/api/views.py Outdated Show resolved Hide resolved
@SantiagoTorres
Copy link

SantiagoTorres commented Dec 13, 2018 via email

Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron Foxboron force-pushed the foxboron/buildinfo-since-endpoint branch from 578abaa to 9e8de99 Compare March 1, 2019 23:14
@Foxboron
Copy link
Author

Foxboron commented Mar 1, 2019

@lamby I have squashed the code review commit

@Foxboron Foxboron closed this Apr 20, 2021
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.

None yet

5 participants