)]}'
{
  "commit": "bc3bd13d3ee8d85884e36bcaa79c183bde536449",
  "tree": "91f13f9b11d210bec7cdf8b84c416c741d2baa08",
  "parents": [
    "9c01319e981f542d6f3de87afd0a67303080f8cf"
  ],
  "author": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Fri Dec 15 10:52:14 2023 +0100"
  },
  "committer": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Thu Dec 21 09:42:41 2023 +0100"
  },
  "message": "Implement changes indexes lock files check\n\nDetect the following failures of both open and closed changes indexes\nwrite.lock files:\n* write.lock file is missing\n* write.lock file is not writeable by Gerrit\n\nNotes:\n* so far only changes indexes are subject of check\n* in order to test it `UseLocalDisk` annotation has to be applied (and\n  it is heavy operation) therefore `HealthCheckIT` was modified so that\n  `changesindex` healthcheck is disabled for all test cases (or\n  additionally disabled in case when some checks get disabled)\n* `changesindex` healthcheck test cases were added to a dedicated\n  `ChangesIndexHealthCheckIT` file\n* common functions from `HealthCheckIT` and `ChangesIndexHealthCheckIT`\n  were introduced in `AbstractHealthCheckIntegrationTest`\n\nThe write.lock ownership change detection was tested manually with the\nfollowing steps:\n* docker run --rm -p 8080:8080 -p 29418:29418 -ti --name gerrit_3.9.1 gerritcodereview/gerrit:3.9.1\n* docker cp bazel-bin/plugins/healthcheck/healthcheck.jar gerrit_3.9.1:/var/gerrit/plugins\n* curl localhost:8080/config/server/healthcheck~status returned\n  \"changesindex\": {\n    \"result\": \"passed\",\n    \"ts\": 1703147883563,\n    \"elapsed\": 0\n  }\n* docker exec -u root -it gerrit_3.9.1 /bin/bash\n* chown root:root /var/gerrit/index/changes_0084/open/write.lock\n* curl localhost:8080/config/server/healthcheck~status returned\n  \"changesindex\": {\n    \"result\": \"failed\",\n    \"ts\": 1703148022276,\n    \"elapsed\": 0\n  }\n\nIOW it works as expected.\n\nBug: Issue 40015289\nChange-Id: I66a4053483e2c10eb28c150782c33cfd10dc2b15\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "584787ac5dace4fddb36edb5258b5b175310f2db",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ChangesIndexHealthCheck.java",
      "new_id": "176cea9b6e4838024b0467a6622dbb3539608bf4",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ChangesIndexHealthCheck.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cd3862e054aada7051522d59a19ba4a4861df87b",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/healthcheck/AbstractHealthCheckIntegrationTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "33d32770396fbf96cf2b021ec311da88d282302b",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/healthcheck/ChangesIndexHealthCheckIT.java"
    },
    {
      "type": "modify",
      "old_id": "1aa698c95fdb9e862e083688a6d4601c0197f910",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java",
      "new_id": "a0c98851e42ffe9df5dd91d3815eceaeeb341cfa",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java"
    }
  ]
}
