Skip to content

Commit 5d53fbf

Browse files
nspringfacebook-github-bot
authored andcommitted
watchman autobuild on ubuntu 24.04 (#1312)
Summary: experiment to see whether the library / test-hang issue is specific to 22 not 24. Differential Revision: D86626357
1 parent 3bb5973 commit 5d53fbf

12 files changed

Lines changed: 74 additions & 24 deletions

File tree

.github/workflows/getdeps_linux.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
build:
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Show disk space at start
@@ -36,6 +36,9 @@ jobs:
3636
- name: Fetch boost
3737
if: ${{ steps.paths.outputs.boost_SOURCE }}
3838
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost
39+
- name: Fetch bz2
40+
if: ${{ steps.paths.outputs.bz2_SOURCE }}
41+
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests bz2
3942
- name: Fetch ninja
4043
if: ${{ steps.paths.outputs.ninja_SOURCE }}
4144
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja
@@ -154,6 +157,22 @@ jobs:
154157
with:
155158
path: ${{ steps.paths.outputs.boost_INSTALL }}
156159
key: ${{ steps.paths.outputs.boost_CACHE_KEY }}-install
160+
- name: Restore bz2 from cache
161+
id: restore_bz2
162+
if: ${{ steps.paths.outputs.bz2_SOURCE }}
163+
uses: actions/cache/restore@v4
164+
with:
165+
path: ${{ steps.paths.outputs.bz2_INSTALL }}
166+
key: ${{ steps.paths.outputs.bz2_CACHE_KEY }}-install
167+
- name: Build bz2
168+
if: ${{ steps.paths.outputs.bz2_SOURCE && ! steps.restore_bz2.outputs.cache-hit }}
169+
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests bz2
170+
- name: Save bz2 to cache
171+
uses: actions/cache/save@v4
172+
if: ${{ steps.paths.outputs.bz2_SOURCE && ! steps.restore_bz2.outputs.cache-hit }}
173+
with:
174+
path: ${{ steps.paths.outputs.bz2_INSTALL }}
175+
key: ${{ steps.paths.outputs.bz2_CACHE_KEY }}-install
157176
- name: Restore ninja from cache
158177
id: restore_ninja
159178
if: ${{ steps.paths.outputs.ninja_SOURCE }}

build/fbcode_builder/manifests/glog

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ HAVE_TR1_UNORDERED_SET=OFF
2424
[homebrew]
2525
glog
2626

27-
# on ubuntu glog brings in liblzma-dev, which in turn breaks watchman tests
28-
[debs.not(distro=ubuntu)]
27+
[debs]
2928
libgoogle-glog-dev
3029

3130
[rpms.distro=fedora]

build/fbcode_builder/manifests/libunwind

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ name = libunwind
55
libunwind-devel
66
libunwind
77

8-
# on ubuntu this brings in liblzma-dev, which in turn breaks watchman tests
9-
[debs.not(distro=ubuntu)]
8+
[debs]
109
libunwind-dev
1110

1211
# The current libunwind v1.8.1 release has compiler issues with aarch64 (https://github.com/libunwind/libunwind/issues/702).

build/fbcode_builder/manifests/watchman

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pcre2
2121
googletest
2222
python-setuptools
2323

24+
[dependencies.os=linux]
25+
bz2
26+
2427
[dependencies.fbsource=on]
2528
rust
2629

build/fbcode_builder/manifests/xz

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[manifest]
22
name = xz
33

4-
# ubuntu's package causes watchman's tests to hang
5-
[debs.not(distro=ubuntu)]
4+
[debs]
65
liblzma-dev
76

87
[homebrew]

watchman/integration/test_age_watch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_watchReap(self) -> None:
3535
self.assertWaitFor(
3636
lambda: self.rootIsWatched(root),
3737
message="%s was not watched by watchman-wait" % root,
38+
timeout=10,
3839
)
3940

4041
self.watchmanCommand("trigger-del", root, "t")
@@ -44,7 +45,7 @@ def test_watchReap(self) -> None:
4445

4546
# subscription won't stick in cli mode
4647
if self.transport != "cli":
47-
self.assertWaitFor(lambda: self.rootIsWatched(root))
48+
self.assertWaitFor(lambda: self.rootIsWatched(root), timeout=10)
4849

4950
# let's verify that we can safely reap two roots at once without
5051
# causing a deadlock
@@ -57,5 +58,6 @@ def test_watchReap(self) -> None:
5758
self.assertTrue(unsub["deleted"], "deleted subscription %s" % unsub)
5859
# and now we should be ready to reap
5960
self.assertWaitFor(
60-
lambda: not self.rootIsWatched(root) and not self.rootIsWatched(second)
61+
lambda: not self.rootIsWatched(root) and not self.rootIsWatched(second),
62+
timeout=10,
6163
)

watchman/integration/test_remove.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ def test_remove(self) -> None:
4343
self.assertWaitFor(
4444
lambda: not self.rootIsWatched(root),
4545
message="%s should be cancelled" % root,
46+
timeout=10,
4647
)

watchman/integration/test_request_id.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ def test_queryRequestId(self) -> None:
4747
self.watchmanCommand("query", root, params)
4848
pat = re.compile(".* \\[client=.*\\] request_id = %s" % request_id)
4949

50+
print("ntspring waiting 10s for log")
5051
self.assertWaitFor(
5152
lambda: any(pat.match(l) for l in self.getServerLogContents()),
5253
message="request_id logged",
54+
timeout=10,
5355
)
56+
print("ntspring waited for log")
5457

5558
def skipIfNoHgRequestIdSupport(self) -> None:
5659
root = self.mkdtemp()
@@ -131,4 +134,5 @@ def try_read_blackbox():
131134
self.assertWaitFor(
132135
lambda: request_id in try_read_blackbox(),
133136
message="request_id passed to and logged by hg",
137+
timeout=10,
134138
)

watchman/integration/test_sock_perms.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def test_too_open_user_dir(self) -> None:
9595
)
9696
self.assertWaitFor(
9797
lambda: wanted in instance.getCLILogContents(),
98+
timeout=10,
9899
get_debug_output=lambda: instance.getCLILogContents(),
99100
)
100101

@@ -123,6 +124,7 @@ def test_invalid_sock_group(self) -> None:
123124
self.assertWaitFor(
124125
lambda: (wanted in instance.getCLILogContents())
125126
or (we_love_ldap in instance.getCLILogContents()),
127+
timeout=10,
126128
get_debug_output=lambda: str(ctx.exception)
127129
+ "\n"
128130
+ instance.getCLILogContents(),
@@ -137,6 +139,7 @@ def test_user_not_in_sock_group(self) -> None:
137139
wanted = "setting up group '%s' failed" % group.gr_name
138140
self.assertWaitFor(
139141
lambda: wanted in instance.getCLILogContents(),
142+
timeout=10,
140143
get_debug_output=lambda: instance.getCLILogContents(),
141144
)
142145

@@ -188,7 +191,9 @@ def test_user_previously_in_sock_group(self) -> None:
188191
non_member_group.gr_name,
189192
)
190193
)
191-
self.assertWaitFor(lambda: wanted in instance.getServerLogContents())
194+
self.assertWaitFor(
195+
lambda: wanted in instance.getServerLogContents(), timeout=10
196+
)
192197

193198
def test_invalid_sock_access(self) -> None:
194199
instance = self._new_instance({"sock_access": "bogus"})
@@ -198,6 +203,7 @@ def test_invalid_sock_access(self) -> None:
198203
wanted = "Expected config value sock_access to be an object"
199204
self.assertWaitFor(
200205
lambda: wanted in instance.getCLILogContents(),
206+
timeout=10,
201207
get_debug_output=lambda: instance.getCLILogContents(),
202208
)
203209

@@ -208,6 +214,7 @@ def test_invalid_sock_access(self) -> None:
208214
wanted = "Expected config value sock_access.group to be a boolean"
209215
self.assertWaitFor(
210216
lambda: wanted in instance.getCLILogContents(),
217+
timeout=10,
211218
get_debug_output=lambda: instance.getCLILogContents(),
212219
)
213220

watchman/integration/test_trigger.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_triggerIssue141(self) -> None:
5757
self.assertWaitFor(
5858
lambda: os.path.exists(first_log) and os.path.exists(second_log),
5959
message="both triggers fire at start",
60+
timeout=10,
6061
)
6162

6263
# touch the file, should run both triggers
@@ -66,6 +67,7 @@ def test_triggerIssue141(self) -> None:
6667
lambda: self.hasTriggerInLogs(root, "first")
6768
and self.hasTriggerInLogs(root, "second"),
6869
message="both triggers fired on update",
70+
timeout=10,
6971
)
7072

7173
def validate_trigger_output(self, root, files, context) -> None:
@@ -86,6 +88,7 @@ def files_are_listed():
8688
self.assertWaitFor(
8789
lambda: files_are_listed(),
8890
message="%s should contain %s" % (trigger_log, json.dumps(files)),
91+
timeout=10,
8992
)
9093

9194
def files_are_listed_json():
@@ -106,6 +109,7 @@ def files_are_listed_json():
106109
self.assertWaitFor(
107110
lambda: files_are_listed_json(),
108111
message="%s should contain %s" % (trigger_json, json.dumps(files)),
112+
timeout=10,
109113
)
110114

111115
def test_legacyTrigger(self) -> None:
@@ -184,6 +188,7 @@ def test_legacyTrigger(self) -> None:
184188
lambda: self.hasTriggerInLogs(root, "test")
185189
and self.hasTriggerInLogs(root, "other"),
186190
message="both triggers fired on update",
191+
timeout=10,
187192
)
188193

189194
self.validate_trigger_output(root, ["foo.c", "b ar.c"], "initial")

0 commit comments

Comments
 (0)