mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 13:16:50 +00:00
[CI] Keep Track of Workflow Name Instead of Job Name
The metrics script includes some logic to only read look at workflows up to the most recent workflow it has seen previously. This was broken in a previous patch when workflow metrics began to be emitted per job. The logic ending the metrics gathering would never trigger, so we would continually fetch more and more workflows until OOM.
This commit is contained in:
parent
ed32d85d31
commit
b24e14093d
@ -24,6 +24,7 @@ class JobMetrics:
|
||||
status: int
|
||||
created_at_ns: int
|
||||
workflow_id: int
|
||||
workflow_name: str
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -199,6 +200,7 @@ def get_per_workflow_metrics(
|
||||
job_result,
|
||||
created_at_ns,
|
||||
workflow_run.id,
|
||||
workflow_run.name,
|
||||
)
|
||||
)
|
||||
|
||||
@ -278,7 +280,7 @@ def main():
|
||||
for workflow_metric in reversed(current_metrics):
|
||||
if isinstance(workflow_metric, JobMetrics):
|
||||
workflows_to_track[
|
||||
workflow_metric.job_name
|
||||
workflow_metric.workflow_name
|
||||
] = workflow_metric.workflow_id
|
||||
|
||||
time.sleep(SCRAPE_INTERVAL_SECONDS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user