-
Notifications
You must be signed in to change notification settings - Fork 15
Add ability to list jobs #213
Conversation
7e18920
to
ee4597a
Compare
Codecov Report
@@ Coverage Diff @@
## master #213 +/- ##
==========================================
+ Coverage 61.35% 61.86% +0.50%
==========================================
Files 84 88 +4
Lines 4117 4345 +228
==========================================
+ Hits 2526 2688 +162
- Misses 1270 1324 +54
- Partials 321 333 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, 2 main things:
- I am really scared by the SQL stuff, see inline
- Will the list API call return all jobs that ever ran and match the filters? I.e. will this return 100000s of jobs potentially? Should it? Do we know approx how many jobs until it OOMs or the DB aborts the query because it is too large?
forgot to respond to this one, so here goes:
addressed
so, yes, the API has no pagination support at the moment. yes, unfiltered query will return all 100000 or so jobs, but for now it's just 100K integers, so it's not so bad. the first real use case for this will be to find all the paused jobs at the instance startup, of which there will never be more than a single instance can handle anyway, so it's fine. |
714560d
to
14bc45e
Compare
rebased |
With filtering by state and tags. ListJobs call is added to the Storage interface and implemented for both in-memory and RDBMS storage plugins. RDBMS implementation requires database schema changes to allow efficient lookups: * "state" column is added to the jobs table * "job_tags" table is added to map tags to job_id Database migration script is provided to create and populate the new columns. Going forward, they will be maintained by the server.
addressed 2 comments i somehow missed before |
With filtering by state and tags. ListJobs call is added to the Storage interface and implemented for both in-memory and RDBMS storage plugins. RDBMS implementation requires database schema changes to allow efficient lookups: * "state" column is added to the jobs table * "job_tags" table is added to map tags to job_id Database migration script is provided to create and populate the new columns. Going forward, they will be maintained by the server. This is take 2, first was #213 but was reverted due to unrelated issue. There are no substantial changes here.
With filtering by state and tags. ListJobs call is added to the Storage interface and implemented for both in-memory and RDBMS storage plugins. RDBMS implementation requires database schema changes to allow efficient lookups: * "state" column is added to the jobs table * "job_tags" table is added to map tags to job_id Database migration script is provided to create and populate the new columns. Going forward, they will be maintained by the server. This is take 2, first was facebookarchive#213 but was reverted due to unrelated issue. There are no substantial changes here.
With filtering by state and tags.
ListJobs call is added to the Storage interface and implemented for both
in-memory and RDBMS storage plugins. RDBMS implementation requires
database schema changes to allow efficient lookups:
Database migration script is provided to create and populate the new
columns. Going forward, they will be maintained by the server.