)]}'
{
  "commit": "cdb8c78eb7d29e6595053c455141007cb1c13a83",
  "tree": "db17ef01058c8185887e26e31131d62c168a23c7",
  "parents": [
    "6c8d5f9319706be576563b990c875afc0d60d02d"
  ],
  "author": {
    "name": "Serge Bazanski",
    "email": "serge@nexantic.com",
    "time": "Mon Feb 17 12:34:02 2020 +0100"
  },
  "committer": {
    "name": "Serge Bazanski",
    "email": "serge@nexantic.com",
    "time": "Mon Feb 17 12:34:02 2020 +0100"
  },
  "message": "Revamp DHCP, add basic context management\n\nThis started off as a small change to make the network service DHCP client a bit nicer, and ended up basically me half-assedly starting to add context within Smalltown.\n\nIn my opionion a simple OnStart/OnStop lifecycle management for services will stop working once we have to start handling failing services. I think taking inspiration from Erlang\u0027s OTP and implementing some sort of supervision tree is the way to go. I think this also ties nicely together with Go\u0027s context system, at least partially. Implementing the full supervision tree system is out of scope for this change, but at least this introduces .Context() on the base service struct that service implementations can use. Currently each service has its own background context, but again, this should tie into some sort of supervision tree in the future. There will be a design document for this.\n\nI also rejigger the init code to have a context available immediately, and use that to acquire (with timeout) information about DHCP addresses from the network service.\n\nI also fix a bug where the network service is started twice (once by init, once by the smalltown node code; now the smalltown node code takes in a dependency injected network service instead).\n\nI also fix a bug where OnStop would call OnStart. Whoops.\n\nTest Plan: no new functionality, covered by current tests\n\nBug: T561\n\nX-Origin-Diff: phab/D396\nGitOrigin-RevId: adddf3dd2f140b6ea64eb034ff19533d32c4ef23\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "afe4a39a238195ff6eafb4043320c4ee6fca42c5",
      "old_mode": 33188,
      "old_path": "core/cmd/init/BUILD.bazel",
      "new_id": "e8e55dc2d59b4979070a98132c8fa60cf4bbe1a0",
      "new_mode": 33188,
      "new_path": "core/cmd/init/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "2219a35814b80a1990020c2de547257783fecacc",
      "old_mode": 33188,
      "old_path": "core/cmd/init/main.go",
      "new_id": "82ba033b456f21522a99342ef7c7f49819609503",
      "new_mode": 33188,
      "new_path": "core/cmd/init/main.go"
    },
    {
      "type": "modify",
      "old_id": "e093ff6f7af85b312bf9448dfd4370df734eb0a5",
      "old_mode": 33188,
      "old_path": "core/internal/common/service/service.go",
      "new_id": "1cbedbec5fefda1d6cd5ba9762b9b16a02029f40",
      "new_mode": 33188,
      "new_path": "core/internal/common/service/service.go"
    },
    {
      "type": "modify",
      "old_id": "3208ea82dfc891a96810048b2f1c732edb99a77f",
      "old_mode": 33188,
      "old_path": "core/internal/network/BUILD.bazel",
      "new_id": "78e4885759e64521f37652c9897bbc2d583bc7ea",
      "new_mode": 33188,
      "new_path": "core/internal/network/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f3f25aa2870778e74a8134512cc51df83c594722",
      "new_mode": 33188,
      "new_path": "core/internal/network/dhcp.go"
    },
    {
      "type": "modify",
      "old_id": "04ab15935168db5a8b1b516c8482b6b33a05076a",
      "old_mode": 33188,
      "old_path": "core/internal/network/main.go",
      "new_id": "7c22249cfaa9c73310545d6054065c5e53e734d4",
      "new_mode": 33188,
      "new_path": "core/internal/network/main.go"
    },
    {
      "type": "modify",
      "old_id": "b1d74d6b2e8d2eb193d0c8f3ce0605379bac04d4",
      "old_mode": 33188,
      "old_path": "core/internal/node/main.go",
      "new_id": "b0674d2b7c50e8c3015fc160358b419559ee924f",
      "new_mode": 33188,
      "new_path": "core/internal/node/main.go"
    },
    {
      "type": "modify",
      "old_id": "23eb24cba79905cb10b4e5d2eb423526b02ab022",
      "old_mode": 33188,
      "old_path": "core/internal/node/setup.go",
      "new_id": "cbbfd4d940a336ff1891b95c016ae125c6333d19",
      "new_mode": 33188,
      "new_path": "core/internal/node/setup.go"
    },
    {
      "type": "modify",
      "old_id": "3b4b57d1f05666cad1d9c6acd6f3dbc8f844295a",
      "old_mode": 33261,
      "old_path": "core/scripts/test_boot.sh",
      "new_id": "03cf8c4470eb34eb88051590078a93c0dcb41946",
      "new_mode": 33261,
      "new_path": "core/scripts/test_boot.sh"
    }
  ]
}
