ocurrent / multicoretests-ci

Multi-platform CI for the OCaml compiler
https://ocaml-multicoretests.ci.dev:8100
MIT License
5 stars 6 forks source link

Extra associated data in 'Commit search' page #11

Open benmandrew opened 1 year ago

benmandrew commented 1 year ago

It would be useful to have more information associated with each job, for example:

Other fields can be requested in comments below.

Current system

The commit search page is currently backed by a database with the following schema:

ci_build_index (
  label  TEXT NOT NULL,
  hash   TEXT NOT NULL,
  job_id TEXT NOT NULL,
  PRIMARY KEY (label, hash, job_id)
)

where job_id is for example linux-arm64-5.0, encoding the OS, architecture, and OCaml version of the job.

On job creation a database record is immediately entered into ci_build_index. We have no current way of modifying existing records, making changing data like those detailed above more difficult to keep in sync.

What would be required

  1. A database migration system would be required to change the deployed DB schema to the one desired. This system already exists in index.ml of ocurrent/ocaml-ci.
  2. DB queries would have to be written to be able to update records.
  3. At all points in the code where relevent job events occur, the right DB queries would have to be run. If any are missed then the in-memory and database state could fall out of sync.