)]}'
{
  "commit": "cdc9a5df7f0ed6762c1775121ec6cf314e53aefe",
  "tree": "46f6a89ef1e2e170afc3dfdd5ac7c30da03eeb44",
  "parents": [
    "8c229a703ccb024a8b5b1b849a56ceef0b66a4bd"
  ],
  "author": {
    "name": "Andy Grove",
    "email": "agrove@apache.org",
    "time": "Tue Sep 15 12:31:36 2026 -0600"
  },
  "committer": {
    "name": "Andy Grove",
    "email": "agrove@apache.org",
    "time": "Wed Sep 16 08:31:06 2026 -0600"
  },
  "message": "ci: write large actions/cache entries only on push to main\n\nAn actions/cache entry is scoped to the ref that wrote it: a run restores\nfrom its own ref and from the default branch, and nothing else. So an entry\nwritten from refs/pull/*/merge is visible only to another run of the same\npull request, and one written from the merge queue\u0027s gh-readonly-queue/*\nbranch is visible to nobody, because the queue deletes that branch when it\nis finished with it. Both still consume the repository\u0027s shared cache\nbudget, which is evicted least-recently-used.\n\nOn 2026-09-15 the repository held 12.27 GiB across 14 entries: 9.22 GiB on\none gh-readonly-queue/* branch, 3.01 GiB on refs/pull/*/merge, and nothing\nat all on main. Seven near-identical Linux-java-maven-* Maven repositories\naccounted for 9.06 GiB of it, every one of them a write-only copy. With\nmain\u0027s cargo-ci entry evicted, all eight native builds in merge_group run\n34977717057 missed their cache and paid a cold compile of 20 to 28 minutes\neach, 259 runner-minutes in a single run. The same build on the push run two\nhours later restored in 56s and compiled in 2m21s.\n\nThe two cargo saves in pr_build_linux.yml carried `if: github.ref \u003d\u003d\n\u0027refs/heads/main\u0027` when this was written. #5963 has since replaced that guard\nwith `if: github.event_name \u003d\u003d \u0027push\u0027`, which also excludes the scheduled run\nat the same sha, so both conditions are now spelled out together and\ncheck_cache_save_scope can see the ref half. Hold every other large cache to\nthe same rule: a cache of ~/.m2/repository or of a cargo tree is restored\neverywhere and saved only on push to main. The bare actions/cache@vN form\ncannot express that, since it saves in an implicit post step no `if:` can\nreach, so those sites split into actions/cache/restore plus a guarded\nactions/cache/save.\n\nThe TPC-H and TPC-DS datasets keep the read-write form: they are a few\nhundred MB, they are keyed on the workflow file, and a pull request editing\nthat file would otherwise regenerate them on every run. publish_snapshot.yml\nkeeps it too, since it runs from main on a schedule already.\n\ncheck_cache_save_scope in dev/ci/check-ci-config.py pins both halves, and\nrejects a new bare actions/cache@vN on any of those paths. Six mutations\nwere used to confirm it fails: reverting a site to the read-write form,\ndropping the github.ref guard from each of four saves, and adding a fresh\nunguarded cargo cache.\n\npyarrow_udf_test.yml now lists itself in its paths filter. It sits outside\nthe ci.yml umbrella, so compute-changes.py does not route it, and an edit to\nthe file merged without the workflow ever running -- including the cache\nstep changed here.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "42078b3c44d65e04f78833b105e7ef60998637fb",
      "old_mode": 33188,
      "old_path": ".github/actions/java-test/action.yaml",
      "new_id": "d4cc384a93aa6bec1f1d1a76c80e97c960ca765a",
      "new_mode": 33188,
      "new_path": ".github/actions/java-test/action.yaml"
    },
    {
      "type": "modify",
      "old_id": "c39c2dcd4f9e6fc11dffe85697640699ba9305bb",
      "old_mode": 33188,
      "old_path": ".github/actions/rust-test/action.yaml",
      "new_id": "2d1fb0bb9a13094b750aa82129c2bfd8273a0cc0",
      "new_mode": 33188,
      "new_path": ".github/actions/rust-test/action.yaml"
    },
    {
      "type": "modify",
      "old_id": "84804c0a798ea763e8233342187ac06492adfcae",
      "old_mode": 33188,
      "old_path": ".github/actions/setup-spark-builder/action.yaml",
      "new_id": "40f3a1e4a8e86e27ebd4b258a7889f7b0f230b85",
      "new_mode": 33188,
      "new_path": ".github/actions/setup-spark-builder/action.yaml"
    },
    {
      "type": "modify",
      "old_id": "0f1f93fe94e5aa26111b2b889ca0704afceadcb3",
      "old_mode": 33188,
      "old_path": ".github/workflows/README.md",
      "new_id": "3b8f9c56a65e9f7427ac87106d7fa2bf91a0cd12",
      "new_mode": 33188,
      "new_path": ".github/workflows/README.md"
    },
    {
      "type": "modify",
      "old_id": "933714d9d72f96a711672b5bee3c480104411702",
      "old_mode": 33188,
      "old_path": ".github/workflows/pr_benchmark_check.yml",
      "new_id": "bc2559a57fcbb0f18d1bc09778068b40104e3044",
      "new_mode": 33188,
      "new_path": ".github/workflows/pr_benchmark_check.yml"
    },
    {
      "type": "modify",
      "old_id": "cf32f9dad662be5b37207d451b41bec75c2166c5",
      "old_mode": 33188,
      "old_path": ".github/workflows/pr_build_linux.yml",
      "new_id": "1438ff6a2c9cc65b65764b25bbcffe06d766ce48",
      "new_mode": 33188,
      "new_path": ".github/workflows/pr_build_linux.yml"
    },
    {
      "type": "modify",
      "old_id": "af4adab863438fb1e1e70bd5b4fc3b675f15585b",
      "old_mode": 33188,
      "old_path": ".github/workflows/pr_build_macos.yml",
      "new_id": "310a4f04014f229a0767ebdccd329df0f092029c",
      "new_mode": 33188,
      "new_path": ".github/workflows/pr_build_macos.yml"
    },
    {
      "type": "modify",
      "old_id": "a84fe69e4266e23b46c81645e56431b7d4d0a9b3",
      "old_mode": 33188,
      "old_path": ".github/workflows/pyarrow_udf_test.yml",
      "new_id": "a3797f913b511cb7a4ba9ce26d31a8f6f0447911",
      "new_mode": 33188,
      "new_path": ".github/workflows/pyarrow_udf_test.yml"
    },
    {
      "type": "modify",
      "old_id": "b271bc60f65947beb5d7885d8fac3ec574327bf9",
      "old_mode": 33188,
      "old_path": "dev/ci/check-ci-config.py",
      "new_id": "abb6b1f2d4b3e6db4e2af464e222b464a641d664",
      "new_mode": 33188,
      "new_path": "dev/ci/check-ci-config.py"
    }
  ]
}
