Match Platform and Worker messages properties
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 acommand_digest
set, otherwiseExecutionInstance.execute()
will throw aFailedPreconditionError
exception. Change the tests to reflect that. -
Refactor the
Job
class to have a newplatform_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 inScheduler._worker_is_capable()
, to be modified in the future.