feat: introduce backward compat with Lix deployments

Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
raito 2024-10-07 15:22:33 +02:00
parent ed8f940717
commit 60860d3084

View file

@ -40,7 +40,7 @@ from .binary_cache import S3BinaryCacheConfig
log = Logger()
FLAKE_TARGET_ATTRIBUTE_FOR_JOBS = "buildbotJobs"
FLAKE_TARGET_ATTRIBUTE_FOR_JOBS = "hydraJobs"
@dataclass
class EvaluatorSettings:
@ -200,11 +200,13 @@ class BuildTrigger(steps.BuildStep):
project_name = build_props.getProperty("event.refUpdate.project") or build_props.getProperty("event.change.project")
source = f"{project_name}-eval"
attr = job.get("attr", "eval-error")
name = f"buildbotJobs.{attr}"
# FIXME(raito): this was named this way for backward compatibility with Lix deployment.
# We should just parametrize this.
name = f"hydraJobs.{attr}"
error = job.get("error")
props = Properties()
props.setProperty("virtual_builder_name", name, source)
props.setProperty("status_name", f"building buildbotJobs.{attr}", source)
props.setProperty("status_name", f"building hydraJobs.{attr}", source)
props.setProperty("virtual_builder_tags", "", source)
if error is not None: