Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions datadog-synthetics_tests.tf
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,35 @@ EOT
}
}

resource "datadog_synthetics_test" "pytorch-gha-runners-queue-check-meta-h100" {
type = "api"
name = "GHA Runner Queue Check - Meta Runners - AWS H100"
message = <<EOT
Detected GitHub Runner Queue - Meta Runners - AWS H100 has jobs waiting
unusually long for runners.

{{synthetics.attributes.result.failure.message}}

Check https://hud.pytorch.org/metrics for more details.

@slack-pytorch-infra-alerts
EOT
status = "live"
tags = ["env:project", "project:pytorch", "service:gha-runners"]
locations = ["aws:us-west-2"]
options_list {
tick_every = 900
}
request_definition {
method = "GET"
url = "https://hud.pytorch.org/api/clickhouse/queued_jobs_by_label?parameters=%7B%7D"
}
assertion {
type = "javascript"
code = file("scripts/check-long-queue-meta.js")
}
}

resource "datadog_synthetics_test" "pytorch-gha-runners-queue-check-nvidia" {
type = "api"
name = "GHA Runner Queue Check - Nvidia Runners"
Expand Down
19 changes: 19 additions & 0 deletions scripts/check-long-queue-meta-h100.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
dd.expect(dd.response.statusCode).to.equal(200);

const MACHINE_TYPE_FILTER = 'linux.aws.h100';
const jsonData = dd.response.body;
const parsedData = JSON.parse(jsonData);

const highQueueItems = parsedData
.filter(item => item.machine_type.startsWith(MACHINE_TYPE_FILTER) && item.avg_queue_s > 14400)
.map(item => ({ machine_type: item.machine_type, avg_queue_s: item.avg_queue_s }));

if (highQueueItems.length > 0) {
const machineDetails = highQueueItems
.map(item => `${item.machine_type} (${item.avg_queue_s}s)`)
.join(', ');
const message = `High queue detected for machine types containing ${MACHINE_TYPE_FILTER}: ${machineDetails}`;
console.error(message);
}

dd.expect(highQueueItems.length > 0).to.be.false;
2 changes: 1 addition & 1 deletion scripts/check-long-queue-meta.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dd.expect(dd.response.statusCode).to.equal(200);
const EXCLUDED_MACHINE_PATTERNS = ['.dgx.', '.rocm.', '.s390x', '^lf\\.'];
const EXCLUDED_MACHINE_PATTERNS = ['.dgx.', '.rocm.', '.s390x', '^lf\\.', '^linux.aws.h100'];
const jsonData = dd.response.body;
const parsedData = JSON.parse(jsonData);
const highQueueItems = parsedData
Expand Down