Skip to content

Match Platform and Worker messages properties

Santiago Gil requested to merge santigl/104-platform-matching into master

Description

Take into account the properties specified by the client with Platform messages inside Command messages as well as the analogous properties specified for workers.

Note: The Platform messages are in process of being standardized. Relevant discussion: https://github.com/bazelbuild/remote-apis/issues/38

Changes proposed in this merge request:

  • Allow passing platform attributes in the CLI.

  • Refactor the dummy requests: all Actions must have a command_digest set, otherwise ExecutionInstance.execute() will throw a FailedPreconditionError exception. Change the tests to reflect that.

  • Refactor the Job class to have a new platform_properties attribute.

  • Refactor the scheduler to try and match properties between worker and job before doing work assignments. The scheduler will now go through the queue looking for the first job that can be assigned to the worker.

  • As a placeholder while the Platform message is standardized, compare only OS and ISAs by using a simple set logic comparison. The logic is implemented in Scheduler._worker_is_capable(), to be modified in the future.

This merge request, when merged, will address issue/bug:

#104 (closed)

Edited by Santiago Gil

Merge request reports

Loading