Skip to content

Commit af1447f

Browse files
authored
Allow opt-in shallow cloning (GH-744)
Opt-in on ware-win11-arm64; something seems to be going wrong with the blobless clones on that worker.
1 parent 008520f commit af1447f

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
@@ -38,7 +38,8 @@ def __init__(
3838
parallel_tests=None,
3939
timeout_factor=1,
4040
exclude_test_resources=None,
41-
downtime=None
41+
downtime=None,
42+
git_options=None,
4243
):
4344
self.name = name
4445
self.tags = tags or set()
@@ -48,6 +49,7 @@ def __init__(
4849
self.timeout_factor = timeout_factor
4950
self.exclude_test_resources = exclude_test_resources or []
5051
self.downtime = downtime
52+
self.git_options = git_options or {}
5153

5254
worker_settings = settings.workers[name]
5355
owner = name.split("-")[0]
@@ -310,6 +312,14 @@ def get_workers(settings):
310312
tags=['windows', 'win11', 'arm64'],
311313
parallel_tests=8,
312314
not_branches=['3.10', '3.11', '3.12'],
315+
git_options=dict(
316+
# Do a full shallow clone for every build
317+
mode="full",
318+
method="clobber",
319+
shallow=True,
320+
# Disable the default, if set
321+
filters=None,
322+
),
313323
),
314324
cpw(
315325
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)