)]}'
{
  "commit": "4cf9bb0363d3fcba3b15f79a31601dc28eaa12d1",
  "tree": "343d2baf773afe7bc98a096373f88e98e42c0f15",
  "parents": [
    "ae6a3a5123762e78185a357ac5d05924a0b733c1"
  ],
  "author": {
    "name": "Leandro Lovisolo",
    "email": "lovisolo@google.com",
    "time": "Wed Dec 13 03:15:58 2023 +0000"
  },
  "committer": {
    "name": "SkCQ",
    "email": "skcq-be@skia-corp.google.com.iam.gserviceaccount.com",
    "time": "Wed Dec 13 13:50:11 2023 +0000"
  },
  "message": "[bazel] //cmd/presbmit/presubmit.go: Run \"npm ci\" step on CI.\n\nIn https://skia-review.googlesource.com/c/buildbot/+/787329 I updated Prettier to v3.1.0. Since then, we have seen some (but not all) Housekeeper-OnDemand-Presubmit tasks fail with:\n\n    npm WARN exec The following package was not found and will be installed: prettier\n    npm ERR! code E451\n    npm ERR! 451 unknown - GET https://npm.skia.org/skia-infra/prettier/-/prettier-3.1.1.tgz\n\nExample: https://task-scheduler.skia.org/job/fybXDSw4BolKQ8FgX6ZP.\n\nThe reason for this failure is that:\n\n - Bazel used to manage the node_modules directory for us, but this has ceased to be true since we upgraded to Bazel 6.0.0. This means we don\u0027t get a node_modules directory unless we explicitly create one, e.g. with \"npm ci\".\n\n - The \"npx prettier\" command first looks for a \"prettier\" package in node_modules, and if it does not find it, it tries to download the latest \"prettier\" version, apparently ignoring the exact version specified in //package.json and/or //package-lock.json.\n\n - \"npx\" fails to download \"prettier\" because the latest version (3.1.1) is too new, and therefore npm-audit-mirror rejects it, hence the 451 error.\n\nThe solution I\u0027ve found is to run \"npm ci\" right before \"npx prettier\", which ensures we have a node_modules directory.\n\nBug: b/314813928\nChange-Id: I2de92c62c82a682afd852f416330766eacfa5e9e\nReviewed-on: https://skia-review.googlesource.com/c/buildbot/+/789219\nCommit-Queue: Kevin Lubick \u003ckjlubick@google.com\u003e\nReviewed-by: Kevin Lubick \u003ckjlubick@google.com\u003e\nAuto-Submit: Leandro Lovisolo \u003clovisolo@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "579b7ecc643f1d19170c4f4e4273e8b920a1ce40",
      "old_mode": 33188,
      "old_path": "cmd/presubmit/presubmit.go",
      "new_id": "418a88f3022889bc7f66f470dd2737f77c2c69fe",
      "new_mode": 33188,
      "new_path": "cmd/presubmit/presubmit.go"
    }
  ]
}
