Skip to content

Commit

Permalink
Downgrade abseil-cpp
Browse files Browse the repository at this point in the history
Also add a test that repeatedly starts a Bazel client and verifies that it reaches the server.

Work towards #22692

Closes #22695.

PiperOrigin-RevId: 642526003
Change-Id: I73250b89a887f5357f74b4fbcb44327d40bf0854
  • Loading branch information
fmeum authored and copybara-github committed Jun 12, 2024
1 parent 0dbfacc commit 651294b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
12 changes: 1 addition & 11 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bazel_dep(name = "rules_python", version = "0.28.0")
bazel_dep(name = "rules_testing", version = "0.6.0")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "with_cfg.bzl", version = "0.2.4")
bazel_dep(name = "abseil-cpp", version = "20240116.2")
bazel_dep(name = "abseil-cpp", version = "20230802.1")

# TODO(fmeum): Remove the dependency on buildozer after Bazel is built with 7.2.0.
bazel_dep(name = "buildozer", version = "7.1.2")
Expand Down Expand Up @@ -65,16 +65,6 @@ single_version_override(
],
)

# Remove the following patch when the following commit is in a release.
# https://github.com/abseil/abseil-cpp/commit/65a55c2ba891f6d2492477707f4a2e327a0b40dc
single_version_override(
module_name = "abseil-cpp",
patch_strip = 1,
patches = [
"//third_party:abseil-cpp-macos-fix.patch",
],
)

# The following Bazel modules are not direct dependencies for building Bazel,
# but are required for visibility from DIST_ARCHIVE_REPOS in repositories.bzl
bazel_dep(name = "apple_support", version = "1.8.1")
Expand Down
8 changes: 4 additions & 4 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion src/test/py/bazel/bazel_server_mode_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,27 @@
class BazelServerModeTest(test_base.TestBase):

def testBazelServerMode(self):
self.ScratchFile('WORKSPACE')
self.ScratchFile('MODULE.bazel')

_, stdout, _ = self.RunBazel(['info', 'server_pid'])
pid1 = stdout[0]
_, stdout, _ = self.RunBazel(['info', 'server_pid'])
pid2 = stdout[0]
self.assertEqual(pid1, pid2)

def testBazelServerModeStressTest(self):
self.ScratchFile('MODULE.bazel')

last_pid = None
for _ in range(10):
_, stdout, _ = self.RunBazel(
['--ignore_all_rc_files', 'info', 'server_pid']
)
new_pid = stdout[0]
if last_pid is not None:
self.assertEqual(last_pid, new_pid)
last_pid = new_pid


if __name__ == '__main__':
absltest.main()

0 comments on commit 651294b

Please sign in to comment.