NixOS / ofborg-viewer

MIT License
7 stars 5 forks source link

Log API Update: results and possibly no log #17

Open grahamc opened 6 years ago

grahamc commented 6 years ago

The log API now will emit a resultsobject, like on https://logs.nix.ci/logs/nixos/nixpkgs.36796

{
  "attempts": {
    "8424808d-a368-40a4-a64c-915f7e33beb4": {
      "log_url": "https:\\/\\/logs.nix.ci\\/logfile\\/nixos\\/nixpkgs.36796\\/8424808d-a368-40a4-a64c-915f7e33beb4",
      "result": {
        "repo": {
          "owner": "NixOS",
          "name": "nixpkgs",
          "full_name": "NixOS\\/nixpkgs",
          "clone_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs.git"
        },
        "pr": {
          "target_branch": "master",
          "number": 36796,
          "head_sha": "cdca39253698f61050041d14f0e781aad6facd89"
        },
        "system": "x86_64-linux",
        "output": [
          "installing",
          "glibPreFixupPhase",
          "post-installation fixup",
          "shrinking RPATHs of ELF executables and libraries in \\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10",
          "shrinking \\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10\\/bin\\/stupidterm",
          "strip is \\/nix\\/store\\/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1\\/bin\\/strip",
          "stripping (with command strip and flags -S) in \\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10\\/bin",
          "patching script interpreter paths in \\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10",
          "checking for references to \\/build in \\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10...",
          "\\/nix\\/store\\/awmic4rwf3fq9zxjy1y6m00xi9h1lr2x-stupidterm-2018-03-10"
        ],
        "attempt_id": "8424808d-a368-40a4-a64c-915f7e33beb4",
        "success": true,
        "skipped_attrs": [],
        "attempted_attrs": [
          "stupidterm"
        ]
      },
      "metadata": {
        "system": "x86_64-linux",
        "identity": "7c6f434c-buildbox",
        "attempt_id": "8424808d-a368-40a4-a64c-915f7e33beb4",
        "attempted_attrs": [
          "stupidterm"
        ],
        "skipped_attrs": []
      }
    },
    "dc4b273a-af88-44c4-bc3c-11359413cb2f": {
      "metadata": {
        "system": "aarch64-linux",
        "identity": "grahamc-aarch64-community-21",
        "attempt_id": "dc4b273a-af88-44c4-bc3c-11359413cb2f",
        "attempted_attrs": [
          "stupidterm"
        ],
        "skipped_attrs": []
      },
      "log_url": "https:\\/\\/logs.nix.ci\\/logfile\\/nixos\\/nixpkgs.36796\\/dc4b273a-af88-44c4-bc3c-11359413cb2f",
      "result": {
        "repo": {
          "owner": "NixOS",
          "name": "nixpkgs",
          "full_name": "NixOS\\/nixpkgs",
          "clone_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs.git"
        },
        "pr": {
          "target_branch": "master",
          "number": 36796,
          "head_sha": "cdca39253698f61050041d14f0e781aad6facd89"
        },
        "system": "aarch64-linux",
        "output": [
          "installing",
          "glibPreFixupPhase",
          "post-installation fixup",
          "shrinking RPATHs of ELF executables and libraries in \\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10",
          "shrinking \\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10\\/bin\\/stupidterm",
          "strip is \\/nix\\/store\\/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1\\/bin\\/strip",
          "stripping (with command strip and flags -S) in \\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10\\/bin",
          "patching script interpreter paths in \\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10",
          "checking for references to \\/build in \\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10...",
          "\\/nix\\/store\\/p0prb1c0a7fwbmyp0rv1wrsmclj6ag9h-stupidterm-2018-03-10"
        ],
        "attempt_id": "dc4b273a-af88-44c4-bc3c-11359413cb2f",
        "success": true,
        "skipped_attrs": [],
        "attempted_attrs": [
          "stupidterm"
        ]
      }
    },
    "0724e7db-f267-4792-8b33-41b0520f2305": {
      "result": {
        "repo": {
          "owner": "NixOS",
          "name": "nixpkgs",
          "full_name": "NixOS\\/nixpkgs",
          "clone_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs.git"
        },
        "pr": {
          "target_branch": "master",
          "number": 36796,
          "head_sha": "cdca39253698f61050041d14f0e781aad6facd89"
        },
        "system": "x86_64-darwin",
        "output": [],
        "attempt_id": "0724e7db-f267-4792-8b33-41b0520f2305",
        "success": null,
        "skipped_attrs": [
          "stupidterm"
        ],
        "attempted_attrs": null
      }
    }
  }
}

Note that 0724e7db-f267-4792-8b33-41b0520f2305 has no log file and the success key is null. This is because it couldn't build anything, so it skipped it entirely.

samueldr commented 6 years ago

What should it do?

grahamc commented 6 years ago

I don't have strong opinions about it right now, though perhaps it is possibly the first time the small top-tabs design is starting to be stretched... so maybe just hide it?