Add last_used_at field to cluster Agent token
Scope
Provide the information on GraphQL for
- the token
last_used_atas part of the token list - an agent level max(
last_used_at) computed in the backend
We can make the translation from last_used_at to status in JS-land.
Definition of Done
See discussion from issue: #321885 (closed)
-
Add last_used_atfield the to the rails database and Clusters::AgentToken model -
Build a process (similar to the Ci::Runner#heartbeatprocess) wherelast_used_atis updated during eachkasinteraction -
Update GraphQL: add field last_used_at -
Add index for last_used_atsince GraphQl should sort tokens bylast_used_atinstead ofcreated_at -
Update GraphQl sorting -
Add last_used_atfield to UI token table
Edited by Tiger Watson