{
  "type": "record",
  "Aspect": {
    "name": "dataHubExecutionRequestInput",
    "schemaVersion": 2
  },
  "name": "ExecutionRequestInput",
  "namespace": "com.linkedin.pegasus2avro.execution",
  "fields": [
    {
      "type": "string",
      "name": "task",
      "doc": "The name of the task to execute, for example RUN_INGEST"
    },
    {
      "type": {
        "type": "map",
        "values": "string"
      },
      "name": "args",
      "doc": "Arguments provided to the task"
    },
    {
      "Searchable": {
        "fieldName": "executorId",
        "fieldType": "KEYWORD",
        "queryByDefault": false
      },
      "type": "string",
      "name": "executorId",
      "doc": "Advanced: specify a specific executor to route the request to. If none is provided, a \"default\" executor is used."
    },
    {
      "type": {
        "type": "record",
        "name": "ExecutionRequestSource",
        "namespace": "com.linkedin.pegasus2avro.execution",
        "fields": [
          {
            "type": "string",
            "name": "type",
            "doc": "The type of the execution request source, e.g. INGESTION_SOURCE"
          },
          {
            "Relationship": {
              "entityTypes": [
                "dataHubIngestionSource"
              ],
              "name": "ingestionSource"
            },
            "Searchable": {
              "fieldName": "ingestionSource",
              "fieldType": "KEYWORD",
              "queryByDefault": false
            },
            "java": {
              "class": "com.linkedin.pegasus2avro.common.urn.Urn"
            },
            "type": [
              "null",
              "string"
            ],
            "name": "ingestionSource",
            "default": null,
            "doc": "The urn of the ingestion source associated with the ingestion request. Present if type is INGESTION_SOURCE",
            "Urn": "Urn",
            "entityTypes": [
              "dataHubIngestionSource"
            ]
          }
        ]
      },
      "name": "source",
      "doc": "Source which created the execution request"
    },
    {
      "Searchable": {
        "fieldName": "requestTimeMs",
        "fieldType": "COUNT",
        "queryByDefault": false
      },
      "type": "long",
      "name": "requestedAt",
      "doc": "Time at which the execution request input was created"
    },
    {
      "Searchable": {
        "fieldType": "URN"
      },
      "java": {
        "class": "com.linkedin.pegasus2avro.common.urn.Urn"
      },
      "type": [
        "null",
        "string"
      ],
      "name": "actorUrn",
      "default": null,
      "doc": "Urn of the actor who created this execution request.",
      "Urn": "Urn"
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "CliVersionAudit",
          "namespace": "com.linkedin.pegasus2avro.execution",
          "fields": [
            {
              "type": {
                "type": "enum",
                "symbolDocs": {
                  "APPLICATION_DEFAULT": " Step 4 \u2014 fell through to defaultCliVersion from application.yaml. ",
                  "MATRIX_COHORT": " Step 2 \u2014 matched a cohort whose deployments list contains this deployment's id. ",
                  "MATRIX_CONNECTOR_DEFAULT": " Step 3 \u2014 fell through to the connector's _default in the matrix. ",
                  "SOURCE_CONFIG_OVERRIDE": " Step 1 \u2014 explicit cli_version on the ingestion source's recipe config. "
                },
                "name": "CliVersionSource",
                "namespace": "com.linkedin.pegasus2avro.execution",
                "symbols": [
                  "SOURCE_CONFIG_OVERRIDE",
                  "MATRIX_COHORT",
                  "MATRIX_CONNECTOR_DEFAULT",
                  "APPLICATION_DEFAULT"
                ]
              },
              "name": "source",
              "doc": "Which level of the resolution priority hit."
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "serverVersion",
              "default": null,
              "doc": "GMS server version that performed the resolution. Populated regardless of which tier hit.\nEquals `GitVersion.getVersion()` on the pod that wrote this aspect."
            }
          ],
          "doc": "Audit record for the CLI version chosen for an ingestion execution.\n\nStamped on each ingestion or test-connection ExecutionRequestInput. Captures only metadata\nabout the resolution (which tier fired + which GMS performed it) \u2014 the resolved CLI version\nitself lives in `args.version` on the same aspect (the wire-format field consumed by the\nexecutor). Splitting these avoids storing the version string twice on the aspect; this record\nexists so post-hoc forensics can answer \"which tier produced the version, and which GMS wrote\nthis?\" from a single SQL query without log archaeology.\n\nNOTE: this stamps the version GMS *resolved*, not the version the executor actually\ninstalled. The executor may run a different effective version when (a) the recipe's\n`extra_pip` requirements transitively pull in `acryl-datahub`, (b) the customer opts out\nof installing `acryl-datahub` (e.g. `version=\"no-acryl-datahub\"`), or (c) a bundled image\nshort-circuits the install step. Treat this aspect as GMS-side intent, not proof-of-install.\n\nThe resolution chain is, in priority order:\n  1. Per-source `config.version` explicit override (SOURCE_CONFIG_OVERRIDE)\n  2. Cohort whose `deployments` list contains this deployment's id (MATRIX_COHORT)\n  3. Connector's `_default` from the matrix (MATRIX_CONNECTOR_DEFAULT)\n  4. `defaultCliVersion` from application.yaml (APPLICATION_DEFAULT)"
        }
      ],
      "name": "cliVersionAudit",
      "default": null,
      "doc": "Audit metadata for the CLI version chosen for this execution \u2014 which tier of the\nresolution chain produced the version (source config override / matrix cohort / matrix\nconnector default / application default) and which GMS performed the resolution. Stamped at\nrequest time so post-hoc forensics does not require iterating the generic args map. The\nresolved CLI version string itself lives in `args.version` on this same aspect; this record\ndeliberately does not duplicate it. Optional for backward compatibility \u2014 older execution\nrequests will not have this set."
    }
  ],
  "doc": "An request to execution some remote logic or action.\nTODO: Determine who is responsible for emitting execution request success or failure. Executor?"
}