)]}'
{
  "commit": "0bebf3a2871bed5087b9b57feb39ff2a4a973ee2",
  "tree": "08757581e1dbcad35126694812cfbc22a237888f",
  "parents": [
    "88582c44899c3bcd7213059f067e74e886bdc87b"
  ],
  "author": {
    "name": "Yun Peng",
    "email": "pcloudy@google.com",
    "time": "Wed Nov 11 10:47:51 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Nov 11 10:47:51 2026 +0100"
  },
  "message": "bcr_postsubmit: use gcloud storage rsync with fixed mtimes (#3009)\n\nMigrate `bcr_postsubmit.py` from `gsutil` to `gcloud storage rsync`\nagain (see #2588), with a fix for the problem that caused the revert in\n#2589.\n\n## Problem\n\nA fresh git checkout gives every file a new mtime. `gcloud storage\nrsync` keeps the mtime in the object metadata. When the mtime changes,\nit patches the metadata of every object, also when the content is the\nsame.\n\n## Changes\n\n- Set a fixed mtime on all files in `modules/` before rsync. Then rsync\nonly touches objects with changed content. `--checksums-only` finds the\nchanged files.\n- Upload `last_green.txt` with `Cache-Control: no-cache`.\n`get_last_green()` reads this file over HTTP.\n\nEach run is still a full rsync. Thus the latest run alone makes the\nbucket the same as the latest commit.\n\n## Testing\n\nI tested on `gs://bazel-testing` with fresh copies of the files for each\nrun:\n\n| Run | Copies | Metadata patches |\n|---|---|---|\n| Fixed mtime, no changes | 0 | 0 |\n| No fixed mtime, no changes | 0 | all objects |\n| Fixed mtime, 1 edit with the same file size + 1 new version + 1\n`metadata.json` change | 3 | 0 |\n| Fixed mtime, object with a different stored mtime | 0 | 1 |\n\nNote: the first run on the production bucket patches the mtime of all\nobjects one time, because the objects have different stored mtimes now.\nLater runs do not patch.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "654a41260f1650456c2a9a119e99a9fab6f68194",
      "old_mode": 33261,
      "old_path": "buildkite/bazel-central-registry/bcr_postsubmit.py",
      "new_id": "5b2dd4429b83417b567e6c1f22e779e15e84a4f8",
      "new_mode": 33261,
      "new_path": "buildkite/bazel-central-registry/bcr_postsubmit.py"
    }
  ]
}
