compare

GET

job

The following schema covers the data available in the result of a job-compare operation.

{
    "$schema": "http://api.kernelci.org/json-schema/1.0/get_compare_job.json",
    "id": "http://api.kernelci.org/json-schema/1.0/get_compare_job.json",
    "title": "job-compare",
    "description": "The result of a job comparison",
    "type": "object",
    "properties": {
        "_id": {
            "type": "object",
            "description": "The ID of ths object",
            "properties": {
                "$oid": {
                    "type": "string",
                    "description": "The actual ID value"
                }
            }
        },
        "baseline": {
            "type": "object",
            "description": "The baseline job for the comparison, the starting point",
            "properties": {
                "created_on": {
                    "type": "object",
                    "description": "The creation date of the job",
                    "properties": {
                        "$date": {
                            "type": "number",
                            "description": "Milliseconds from epoch time"
                        }
                    }
                },
                "job": {
                    "type": "string",
                    "description": "The name of the job"
                },
                "kernel": {
                    "type": "string",
                    "description": "The name of the kernel"
                },
                "job_id": {
                    "type": "object",
                    "description": "The ID of the job",
                    "properties": {
                        "$oid": {
                            "type": "string",
                            "description": "The actual ID value"
                        }
                    }
                },
                "git_branch": {
                    "type": "string",
                    "description": "The name of the branch"
                },
                "git_commit": {
                    "type": "string",
                    "description": "The SHA of the commit used"
                },
                "git_describe": {
                    "type": "string",
                    "description": "The output of the git-describe command"
                },
                "git_url": {
                    "type": "string",
                    "description": "The URL of the git web interface where the code used to build can be found"
                },
                "total_builds": {
                    "type": "integer",
                    "description": "The total number of builds associated with the job"
                },
                "build_counts": {
                    "type": "array",
                    "description": "List of passed, failed and other build status counts",
                    "additionalItems": false,
                    "maxItems": 3,
                    "items": [
                        {
                            "type": "number",
                            "description": "The total number of passed builds"
                        },
                        {
                            "type": "number",
                            "description": "The total number of failed builds"
                        },
                        {
                            "type": "number",
                            "description": "The total number of unknown/other builds"
                        }
                    ]
                }
            }
        },
        "compare_to": {
            "type": "array",
            "additionalItems": true,
            "description": "List of uniquely identified documents used for the comparison",
            "items": {
                "type": "object",
                "properties": {
                    "created_on": {
                        "type": "object",
                        "description": "The creation date of the job",
                        "properties": {
                            "$date": {
                                "type": "number",
                                "description": "Milliseconds from epoch time"
                            }
                        }
                    },
                    "job": {
                        "type": "string",
                        "description": "The name of the job"
                    },
                    "kernel": {
                        "type": "string",
                        "description": "The name of the kernel"
                    },
                    "job_id": {
                        "type": "object",
                        "description": "The ID of the job",
                        "properties": {
                            "$oid": {
                                "type": "string",
                                "description": "The actual ID value"
                            }
                        }
                    },
                    "git_branch": {
                        "type": "string",
                        "description": "The name of the branch"
                    },
                    "git_commit": {
                        "type": "string",
                        "description": "The SHA of the commit used"
                    },
                    "git_describe": {
                        "type": "string",
                        "description": "The output of the git-describe command"
                    },
                    "git_url": {
                        "type": "string",
                        "description": "The URL of the git web interface where the code used to build can be found"
                    },
                    "total_builds": {
                        "type": "integer",
                        "description": "The total number of builds associated with the job"
                    },
                    "build_counts": {
                        "type": "array",
                        "description": "List of passed, failed and other build status counts",
                        "additionalItems": false,
                        "maxItems": 3,
                        "items": [
                            {
                                "type": "number",
                                "description": "The total number of passed builds"
                            },
                            {
                                "type": "number",
                                "description": "The total number of failed builds"
                            },
                            {
                                "type": "number",
                                "description": "The total number of unknown/other builds"
                            }
                        ]
                    }
                }
            }
        },
        "delta_result": {
            "type": "array",
            "description": "The comparison results",
            "additionalItems": true,
            "items": {
                "type": "array",
                "maxItems": 2,
                "items": [
                    {
                        "type": "array",
                        "description": "Common values for the analyzed build",
                        "additionalItems": false,
                        "maxItems": 3,
                        "items": [
                            {
                                "type": "string",
                                "description": "The defconfig value"
                            },
                            {
                                "type": "string",
                                "description": "The defconfig_full value"
                            },
                            {
                                "type": "string",
                                "description": "The architecture type of the build"
                            }
                        ]
                    },
                    {
                        "type": "array",
                        "description": "The list of build statuses and their IDs",
                        "additionalItems": false,
                        "maxItems": 2,
                        "items": [
                            {
                                "type": "string",
                                "description": "The status of the build"
                            },
                            {
                                "type": "object",
                                "description": "The ID of the build",
                                "properties": {
                                    "$oid": {
                                        "type": "string",
                                        "description": "The actual ID value"
                                    }
                                }
                            }
                        ]
                    }
                ]
            }
        }
    }
}

Notes

  • The items in the array that contains the status results, in the delta_result array, can be: strings that identify the build status or null. In case of a null value, it means that the build in that position was not available.

POST

job

The following schema covers the data that should be available in the JSON data to perform a POST request on the job-compare resource (more info).

{
    "$schema": "http://api.kernelci.org/json-schema/1.0/post_compare_job.json",
    "id": "http://api.kernelci.org/json-schema/1.0/post_compare_job.json",
    "title": "job-compare",
    "description": "The data necessary to perform a job comparison",
    "type": "object",
    "properties": {
        "job": {
            "type": "string",
            "description": "The name of the job to use as the starting point"
        },
        "kernel": {
            "type": "string",
            "description": "The name of kernel to use as the starting point"
        },
        "job_id": {
            "type": "string",
            "description": "The ID of the job to use as the starting point"
        },
        "compare_to": {
            "type": "array",
            "description": "Array of jobs against which to run the comparison",
            "additionalItems": true,
            "items": {
                "type": "object",
                "description": "The data identifying the job to compare against",
                "properties": {
                    "job": {
                        "type": "string",
                        "description": "The name of the job to compare"
                    },
                    "kernel": {
                        "type": "string",
                        "description": "The name of the kernel to compare"
                    },
                    "job_id": {
                        "type": "string",
                        "description": "The ID of the job to compare"
                    }
                }
            }
        }
    }
}

Notes

  • It is necessary to include either the job_id value or both job and kernel. If all are specified, job_id will be used.