Skip to content

Commit c8be9d8

Browse files
authored
Merge pull request #5376 from taskcluster/matt-boris/graphQLUpdates
fix(graphql): update GraphQL query and schemas
2 parents 347f48a + 7336d4d commit c8be9d8

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
audience: general
2+
level: patch
3+
---
4+
Update `ViewWorkers` query to get `lastDateActive`. Update some schemas too.

clients/client-go/tcqueue/types.go

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/references.json

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/queue/schemas/v1/list-workers-response.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ properties:
4848
description: |
4949
The most recent claimed task
5050
$ref: "task-run.json#"
51+
lastDateActive:
52+
title: "Worker Last Date Active"
53+
description: |
54+
Date of the last time this worker was seen active. Updated each time a worker calls
55+
`queue.claimWork`, `queue.reclaimTask`, and `queue.declareWorker` for this task queue.
56+
`lastDateActive` is updated every half hour but may be off by up-to half an hour.
57+
Nonetheless, `lastDateActive` is a good indicator of when the worker was last seen active.
58+
This defaults to null in the database, and is set to the current time when the worker
59+
is first seen.
60+
type: string
61+
format: date-time
5162
additionalProperties: false
5263
required:
5364
- workerGroup

services/queue/schemas/v1/worker-response.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,3 @@ required:
123123
- expires
124124
- firstClaim
125125
- actions
126-
- lastDateActive

ui/src/views/Provisioners/ViewWorkers/workers.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ query ViewWorkers($provisionerId: String!, $workerType: String!, $workersConnect
2222
}
2323
firstClaim
2424
quarantineUntil
25+
lastDateActive
2526
}
2627
}
2728
}

0 commit comments

Comments
 (0)