buildgrid.server.scheduler.properties module

buildgrid.server.scheduler.properties.hash_from_dict(dictionary: dict[str, list[str]]) str

Get the hash represntation of a dictionary

class buildgrid.server.scheduler.properties.PropertySet(*args, **kwargs)

Bases: Protocol

execution_properties(platform: Platform) tuple[str, dict[str, list[str]]]

Parses a platform value and returns the match properties used for scheduling. Returns a label which can be used for applying metrics.

worker_properties(bot_session: BotSession) list[dict[str, list[str]]]

Find all the valid property combinations which can be used to assign work to a bot.

class buildgrid.server.scheduler.properties.DynamicPropertySet(*, unique_property_keys: set[str], match_property_keys: set[str], wildcard_property_keys: set[str], label_key: str | None = None)

Bases: object

execution_properties(platform: Platform) tuple[str, dict[str, list[str]]]
worker_properties(bot_session: BotSession) list[dict[str, list[str]]]
class buildgrid.server.scheduler.properties.PropertyLabel(label: str, properties: set[tuple[str, str]])

Bases: object

label: str
properties: set[tuple[str, str]]
class buildgrid.server.scheduler.properties.StaticPropertySet(*, property_labels: list[buildgrid.server.scheduler.properties.PropertyLabel], wildcard_property_keys: set[str])

Bases: object

execution_properties(platform: Platform) tuple[str, dict[str, list[str]]]
worker_properties(bot_session: BotSession) list[dict[str, list[str]]]
buildgrid.server.scheduler.properties.bot_properties(bot_session: BotSession) dict[str, set[str]]
buildgrid.server.scheduler.properties.partial_bot_properties(properties: dict[str, set[str]]) list[dict[str, list[str]]]
buildgrid.server.scheduler.properties.flatten_properties(properties: dict[str, set[str]]) list[tuple[str, str]]
buildgrid.server.scheduler.properties.merge_property_pairs(property_pairs: Iterable[tuple[str, str]]) dict[str, list[str]]