)]}'
{
  "commit": "14651cd86b6fc1d48f56a208a9b5278b3e2dcf75",
  "tree": "bbddc157b92de8cc717a177055d0e3ce833c002b",
  "parents": [
    "05c967ffa680ea1a2dd1d28834fbf75f9048f8d3"
  ],
  "author": {
    "name": "Artem Zinnatullin",
    "email": "ceo@artemzin.com",
    "time": "Mon Aug 05 09:32:19 2019 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Aug 05 09:33:15 2019 -0700"
  },
  "message": "Fallback to next urls if download fails in HttpDownloader\n\nFixes #8974.\n\n`HttpDownloader` never retried `IOException` that could have occurred during `ByteStreams.copy(payload, out)`, HttpConnector would have retried connection phase errors but not payload ones.\n\nThis chageset adds fallback to next url(s) if present for both payload read errors and connection errors and adds (completely) missing tests for `HttpDownloader`.\n\nNote, that this PR technically disables questionable `HttpConnectorMultiplexer` optimization that attempts to connect to multiple urls at the same time (by starting threads that race with each other) and picking the one that connected faster. There is a way to keep that optimization while falling back to next urls, but it would require all exceptions to contain url that caused it so that `HttpDownloader` could retry download on other urls. I think making `HttpDownloader` more reliable and actually using provided `urls` as fallback is much more important than mentioned optimization.\n\nCloses #9015.\n\nPiperOrigin-RevId: 261702678\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5efe7b52d4975b7313d3d15cefded6afbbe7d3a9",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java",
      "new_id": "90a591873bf0af98b90f47701c14cda97eaf909c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java"
    },
    {
      "type": "modify",
      "old_id": "e5873d4a0dc78826383ba9a62d882ce583acac4f",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/BUILD",
      "new_id": "9d2f046d806c3c84af5d978ea5bcdb14a82c4c35",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/BUILD"
    },
    {
      "type": "modify",
      "old_id": "6a479c2c39d1341c3b4ab6ba32f0c619564babc5",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloaderTestSuite.java",
      "new_id": "60b07e56f52d5186c34ded052f8d7b07ed4e04c5",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloaderTestSuite.java"
    },
    {
      "type": "modify",
      "old_id": "f5dccf879e797b23739430bc797939d1fcb12a82",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexerIntegrationTest.java",
      "new_id": "3b4c5af98a8d1471a0962b38bd07eedfe1b1fba7",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexerIntegrationTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e6ce8fb284dc73d984f14d075224548eeca2fe4b",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloaderTest.java"
    }
  ]
}
