CiWorkerSummary#

pydantic model mobu.models.ci_manager.CiWorkerSummary#

Information about a running worker.

Parameters:

data (Any)

Show JSON schema
{
   "title": "CiWorkerSummary",
   "description": "Information about a running worker.",
   "type": "object",
   "properties": {
      "user": {
         "$ref": "#/$defs/User",
         "description": "User that the worker works as",
         "examples": [
            {
               "gidnumber": null,
               "groups": [],
               "uidnumber": null,
               "username": "bot-mobu-someuser"
            },
            {
               "gidnumber": 456,
               "groups": [],
               "uidnumber": 123,
               "username": "bot-mobu-someuser"
            }
         ]
      },
      "num_processed": {
         "description": "Number of jobs this worker has processed since mobu started",
         "examples": [
            123
         ],
         "title": "Number of jobs processed",
         "type": "integer"
      },
      "current_job": {
         "anyOf": [
            {
               "$ref": "#/$defs/CiJobSummary"
            },
            {
               "type": "null"
            }
         ],
         "description": "The job the worker is currently running, if any",
         "examples": [
            {
               "commit_url": "https://github.com/lsst-sqre/mobu/commit/dd534286bb932dd22d61f97f960a5985b7513ec8"
            }
         ],
         "title": "Current job summary"
      }
   },
   "$defs": {
      "CiJobSummary": {
         "description": "Information about a job.",
         "properties": {
            "commit_url": {
               "description": "GitHub URL to the commit being worked on",
               "examples": [
                  "https://github.com/lsst-sqre/mobu/commit/dd534286bb932dd22d61f97f960a5985b7513ec8"
               ],
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "title": "Commit URL",
               "type": "string"
            }
         },
         "required": [
            "commit_url"
         ],
         "title": "CiJobSummary",
         "type": "object"
      },
      "Group": {
         "description": "Configuration for the group memberships of a user.",
         "properties": {
            "name": {
               "examples": [
                  "g_special_users"
               ],
               "minLength": 1,
               "pattern": "^g_",
               "title": "Name of the group",
               "type": "string"
            },
            "id": {
               "examples": [
                  123181
               ],
               "title": "Numeric GID of the group",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "id"
         ],
         "title": "Group",
         "type": "object"
      },
      "User": {
         "description": "Configuration for the user whose credentials the monkey will use.",
         "properties": {
            "username": {
               "description": "Must start with 'bot-mobu'",
               "examples": [
                  "bot-mobu-testuser"
               ],
               "pattern": "^bot-mobu",
               "title": "Username",
               "type": "string"
            },
            "uidnumber": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "If omitted, Gafaelfawr will assign a UID. (Gafaelfawr UID assignment requires Firestore be configured.)",
               "examples": [
                  60001
               ],
               "title": "Numeric UID"
            },
            "gidnumber": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "If omitted but a UID was specified, use a GID equal to the UID. If both are omitted, Gafaelfawr will assign a UID and GID. (Gafaelfawr UID and GID assignment requires Firestore and synthetic user private groups to be configured.)",
               "examples": [
                  60001
               ],
               "title": "Primary GID"
            },
            "groups": {
               "default": [],
               "description": "Groups of which the user is a member",
               "items": {
                  "$ref": "#/$defs/Group"
               },
               "title": "Groups",
               "type": "array"
            }
         },
         "required": [
            "username"
         ],
         "title": "User",
         "type": "object"
      }
   },
   "required": [
      "user",
      "num_processed",
      "current_job"
   ]
}

Fields:
field current_job: CiJobSummary | None [Required]#

The job the worker is currently running, if any

field num_processed: int [Required]#

Number of jobs this worker has processed since mobu started

field user: User [Required]#

User that the worker works as