Skip to content

Commit

Permalink
bazel: remove shallow_since from git deps fetching as it's likely cou…
Browse files Browse the repository at this point in the history
…nterproductive

Historically, shallow_since was supposed to help avoid a full repository
clone when only a single commit is necessary (apparently it's not as
simple as clone --depth=1 for commits that aren't a branch or a tag).

But the option has known edge cases and is now discouraged:
bazelbuild/bazel#17465.

Further, as far as I can tell individual-commit fetches are properly
supported under v2 git protocol. I can't figure out how to properly
trace the git commands that bazel issues, but a manual v2 fetch against
the AOSP gerrit succeeded (per GIT_TRACE_PACKET), so I hope that bazel
will end up on v2 as well.

So my plan is to submit this and see if CI fetch flakes go away. If not
or we see evidence of full-repo clone fallback kicking in, I'll
investigate further.

Change-Id: I9d6fc5f373a84fdc434b841dbc0575fe3123dd5b
  • Loading branch information
rsavitski committed Apr 17, 2023
1 parent 3ba2c70 commit 433adc6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def perfetto_deps():
remote = "https://fuchsia.googlesource.com/third_party/linenoise.git",
commit = "c894b9e59f02203dbe4e2be657572cf88c4230c3",
build_file = "//bazel:linenoise.BUILD",
shallow_since = "1469784335 +0200",
)

_add_repo_if_not_existing(
Expand All @@ -65,7 +64,6 @@ def perfetto_deps():
remote = "https://github.com/open-source-parsers/jsoncpp",
commit = "6aba23f4a8628d599a9ef7fa4811c4ff6e4070e2", # v1.9.3
build_file = "//bazel:jsoncpp.BUILD",
shallow_since = "1590760226 +0800",
)

_add_repo_if_not_existing(
Expand All @@ -74,7 +72,6 @@ def perfetto_deps():
remote = "https://android.googlesource.com/platform/external/zlib.git",
commit = "6d3f6aa0f87c9791ca7724c279ef61384f331dfd",
build_file = "//bazel:zlib.BUILD",
shallow_since = "1678405807 -0800",
)

_add_repo_if_not_existing(
Expand Down

0 comments on commit 433adc6

Please sign in to comment.