)]}'
{
  "commit": "8818a57fce32a7872f045f03a334e1c9403724d3",
  "tree": "245e426e85406c906abe8749418f96f8a05c041a",
  "parents": [
    "b471bbdf4f1711f7f9ab751165d72f9bf78d6297"
  ],
  "author": {
    "name": "Chi Wang",
    "email": "chiwang@google.com",
    "time": "Tue Nov 29 15:33:00 2022 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Nov 29 12:33:00 2022 -0800"
  },
  "message": "[6.0.0] Only inject metadata for outputs that cannot be reconstructed by skyf… (#16879)\n\n* Update RemoteActionFileSystem to apply permission changes to local files even if remote file exists.\r\n\r\nPreviously, it only applies permission changes to local files when the remote one doesn\u0027t exist. It is fine because the call sites only use these method when remote file are missing. However, this isn\u0027t true with future changes.\r\n\r\nPiperOrigin-RevId: 490872822\r\nChange-Id: I7a19d99cd828294cbafa7b5f3fdc368d64e556ec\r\n\r\n* Fix permission operations for the case of only remote directory.\r\n\r\nPiperOrigin-RevId: 491280334\r\nChange-Id: I30afef9f069eca8aee4d983664f42b3961e95adf\r\n\r\n* Only inject metadata for outputs that cannot be reconstructed by skyframe later\r\n\r\nCurrently, they are symlinks.\r\n\r\nFor other outputs, let skyframe read action file system to construct the metadata.\r\n\r\nBefore this change, we inject metadata of symlink outputs, tree outputs and file outputs inside `RemoteActionFileSystem#flush()` if these outputs are stored inside the in-memory fs. If the outputs are somehow generated in the local fs, skyframe will read the fs later to construct metadata for them.\r\n\r\nHowever, for tree outputs, skyframe always create an empty directory before action execution in the in-memory fs. So inside the `flush`, we always inject metadata for it. It means local tree outputs are ignored. We could update the code to also read local file system when reading tree files, but then the problem is how to construct metadata from file status which is well done by skyframe.\r\n\r\nSo instead of injecting metadata by traversal the filesystem inside `flush`, we just let skyframe to do the job.\r\n\r\nFixes #16789.\r\n\r\nCloses #16812.\r\n\r\nPiperOrigin-RevId: 491622005\r\nChange-Id: I10434e6856a1b2a207f39e07122a9b646edf518c\r\n\r\nCo-authored-by: kshyanashree \u003c109167932+kshyanashree@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "925dfcc790291a21adbe6ee5251aec6404926102",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/actions/BUILD",
      "new_id": "4c473b50961b02712ab881c47393814c559704ea",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/actions/BUILD"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "73184b55e7cc30b9e2e1b546101104ca757e8463",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/actions/RemoteFileStatus.java"
    },
    {
      "type": "modify",
      "old_id": "b7f31149f9f46f75ee41b1ef57431d837d83190f",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java",
      "new_id": "7916bb802322ef5237fd566c1f497f8136ce9416",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java"
    },
    {
      "type": "modify",
      "old_id": "77104d996b1ee30a09d3be118e932465c6bf8a8c",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java",
      "new_id": "f6e45f06189dcb95a4d097628403866fd4399c5b",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java"
    },
    {
      "type": "modify",
      "old_id": "cf1dc3ffac39e6b74807557ab7768edde011aeea",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTestBase.java",
      "new_id": "54e214e3c0f7932cc08c777115d83db53af254ba",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTestBase.java"
    },
    {
      "type": "modify",
      "old_id": "a39e326175062b04ecbae4d0f89e4f0115eb26bd",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/remote/RemoteActionFileSystemTestBase.java",
      "new_id": "02317f5d23eea0103fd6f1607973cd44b064e728",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/remote/RemoteActionFileSystemTestBase.java"
    }
  ]
}
