Skip to content

Commit acd76f5

Browse files
committed
Allow opt-in shallow cloning
Opt-in on ware-win11-arm64; something seems to be going wrong with the blobless clones on that worker.
1 parent a70419e commit acd76f5

2 files changed

Lines changed: 30 additions & 11 deletions

File tree

master/custom/workers.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def __init__(
3434
parallel_tests=None,
3535
timeout_factor=1,
3636
exclude_test_resources=None,
37-
downtime=None
37+
downtime=None,
38+
git_options=None,
3839
):
3940
self.name = name
4041
self.tags = tags or set()
@@ -44,6 +45,7 @@ def __init__(
4445
self.timeout_factor = timeout_factor
4546
self.exclude_test_resources = exclude_test_resources or []
4647
self.downtime = downtime
48+
self.git_options = git_options or {}
4749

4850
worker_settings = settings.workers[name]
4951
owner = name.split("-")[0]
@@ -306,6 +308,14 @@ def get_workers(settings):
306308
tags=['windows', 'win11', 'arm64'],
307309
parallel_tests=8,
308310
not_branches=['3.10', '3.11', '3.12'],
311+
git_options=dict(
312+
# Do a full shallow clone for every build
313+
mode="full",
314+
method="clobber",
315+
shallow=True,
316+
# Disable the default, if set
317+
filters=None,
318+
),
309319
),
310320
cpw(
311321
name="bcannon-wasi",

master/master.cfg

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,26 @@ for branch in BRANCHES:
204204

205205
source = GitHub(
206206
repourl=str(settings.git_url),
207-
timeout=3600,
208207
**branch_args,
209-
# "git clean -fdx": remove all files which are not tracked by Git,
210-
# ignoring the .gitignore rules (ex: remove also ".o" files).
211-
mode="full",
212-
method="fresh",
213-
# Partial (blobless) clone: only fetch commit and tree objects,
214-
# blobs are fetched on demand during checkout.
215-
filters=["blob:none"],
216-
# If fetch fails, wipe and re-clone instead of failing the build.
217-
clobberOnFailure=True,
208+
**{
209+
# defaults
210+
**dict(
211+
timeout=3600,
212+
# "git clean -fdx": remove all files which are not tracked
213+
# by Git, ignoring the .gitignore rules (ex: remove also
214+
# ".o" files).
215+
mode="full",
216+
method="fresh",
217+
# Partial (blobless) clone: only fetch commit and tree
218+
# objects, blobs are fetched on demand during checkout.
219+
filters=["blob:none"],
220+
# If fetch fails, wipe and re-clone instead of failing the
221+
# build.
222+
clobberOnFailure=True,
223+
),
224+
# worker-specific config, overriding defaults
225+
**worker.git_options,
226+
},
218227
)
219228

220229
f = builder_def.factory(

0 commit comments

Comments
 (0)