Skip to content

Isolate jobs by instance name in the Scheduler and JobAssigner

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This MR updates the jobs table in the database to include the instance name of the BuildGrid instance that the job was submitted to. The SQL data store will now use this column to limit access to jobs for the specific instance the data store belongs to, allowing multiple instances' data stores to be backed by the same database without interacting with each others' work.

The JobAssigner uses the data store to find jobs which are ready to be assigned to available workers, so by extension will only assign work for a specific instance name. This MR also adds a check in the JobAssigner that the connected worker shares its instance name with the JobAssigner, to ensure that we only assign work for the correct instance.

Merge request reports