ExecutionService: check throttling when an operation is scheduled
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
Description
This MR support deprioritizing a to-be-scheduled ExecutionRequest
if the client has over-consumed the computing resources above a predefined threshold in metering-servce
This feature is optional so backward compatible with existing BuildGrid versions.
Changes proposed in this merge request:
- Add parser for
MeteringServiceClient
- Call
get_throttling
before anExecutionRequest
is fulfilled - If a request should be throttled, the current logic is to depriorize it -- by changing the priority to
1
- Note that the default priority is
0
.
- Note that the default priority is
Minor
Introducing the new dependency seems to make simple pip-compile
impossible so I also upgraded all dependencies.
- Unpin
aiohttp
- Re-generate
requirements.txt
- Python GRPC doesn't accept uppercase header keys, so they are lowercased.
- Rename
execution_instance.py
totest_execution_instance.py
for pytest auto discovery.
Edited by Zehao Chen