)]}'
{
  "commit": "c7aa9893c146e33a5e76dbbd83115e91a8836021",
  "tree": "77c43381d6e1f1e06f3611e32386dae8bf923cf1",
  "parents": [
    "bb6249bf2f3786ed9e27fcfeb74b3762bf9eb1cb"
  ],
  "author": {
    "name": "Xùdōng Yáng",
    "email": "wyverald@gmail.com",
    "time": "Mon Mar 03 02:35:43 2025 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Mar 03 07:35:43 2025 +0000"
  },
  "message": "fix: Downgrade \"running as root\" error to a warning by default (#2636)\n\nCurrently, by default, rules_python immediately fails when Bazel is run\nas root. The reasoning behind this involves .pyc files being generated\nfor hermetic toolchains when they\u0027re first used, causing cache misses;\nto work around this, rules_python opts to make the toolchain\ninstallation directory read-only, but running Bazel as root would\ncircumvent this. So rules_python actively detects if the current user is\nroot, and hard fails. This check can be disabled by the root module by\nsetting `python.override(ignore_root_user_error\u003dTrue)`. (See more\ncontext in the linked issues/PRs.)\n\nThis causes a reverberating effect across the Bazel ecosystem, as\nrules_python is essentially a dependency of every single Bazel project\nthrough protobuf. Effectively, any Bazel project wishing to run as root\nneed to add the override tag above, even if they don\u0027t have anything to\ndo with Python at all.\n\nThis PR changes the default value of the `ignore_root_user_error` to\nTrue instead. Besides, it now unconditionally tries to make the\ntoolchain installation directory read-only, and only outputs a warning\nif it\u0027s detected that the current user is root.\n\nSee previous discussions at #713, #749, #907, #1008, #1169, etc.\n\nFixes https://github.com/bazelbuild/rules_python/issues/1169.\n\n---------\n\nCo-authored-by: Richard Levasseur \u003crlevasseur@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e447012c98e2dc3495e93448ffb48fa2dd922507",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "849b4587459842b3f90f0c9dc2cf39f1fee687b5",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "ec6f73e41fbafdb8158f0e2f74a874d97e978fd3",
      "old_mode": 33188,
      "old_path": "python/private/python.bzl",
      "new_id": "304a1d77454011f2be487def247dd9cc4b42ec3e",
      "new_mode": 33188,
      "new_path": "python/private/python.bzl"
    },
    {
      "type": "modify",
      "old_id": "c7407c8f2cdcdaca3824e56e1323a64c12f3183d",
      "old_mode": 33188,
      "old_path": "python/private/python_repository.bzl",
      "new_id": "075d4b1195e5d15022f02ece654e807bc75b9a9b",
      "new_mode": 33188,
      "new_path": "python/private/python_repository.bzl"
    },
    {
      "type": "modify",
      "old_id": "e7828b92f5ba314edfb586d1720faece59660549",
      "old_mode": 33188,
      "old_path": "tests/python/python_tests.bzl",
      "new_id": "65522513310e3aed8986cadb0c8580cc75fd86bc",
      "new_mode": 33188,
      "new_path": "tests/python/python_tests.bzl"
    }
  ]
}
