Add jobs support.
Each evaluation registration produces a list of new jobs. Until now, only the jobs which build outputs were not stored in the "Outputs" table were added to the "Builds" table. It means that Cuirass looses track of the job list associated to a given evaluation. This is problematic to provide the overall build status of an evaluation or to find the evaluation providing the best build coverage. Add a new "Jobs" table that stores the job list of each evaluation. Also add a new "/api/jobs" API to consult it. * src/sql/upgrade-2.sql: New file. * Makefile.am (dist_sql_DATA): Add it. * src/schema.sql (Jobs): New table. * src/cuirass/database.scm (db-add-job, db-get-jobs): New procedures. (db-register-builds): Call db-add-job. * src/cuirass/http.scm (url-handler): New "/api/jobs" route. * tests/database.scm ("db-get-jobs", "db-get-jobs names"): New tests. * doc/cuirass.texi (Web API, Database): Document it.
Showing
- Makefile.am 2 additions, 1 deletionMakefile.am
- doc/cuirass.texi 74 additions, 0 deletionsdoc/cuirass.texi
- src/cuirass/database.scm 47 additions, 0 deletionssrc/cuirass/database.scm
- src/cuirass/http.scm 13 additions, 0 deletionssrc/cuirass/http.scm
- src/schema.sql 11 additions, 0 deletionssrc/schema.sql
- src/sql/upgrade-2.sql 14 additions, 0 deletionssrc/sql/upgrade-2.sql
- tests/database.scm 12 additions, 0 deletionstests/database.scm
src/sql/upgrade-2.sql
0 → 100644
Please register or sign in to comment