Skip to content

Commit 2611036

Browse files
authored
Merge branch 'main' into revert-3124-reapply-git-backend-6
2 parents bc0e01c + b2f2cea commit 2611036

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

conda_forge_tick/auto_tick.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def run(
627627
return migration_run_data["migrate_return_value"], ljpr
628628

629629

630-
def _compute_time_per_migrator(migrators):
630+
def _compute_time_per_migrator(mctx, migrators):
631631
# we weight each migrator by the number of available nodes to migrate
632632
num_nodes = []
633633
for migrator in tqdm.tqdm(migrators, ncols=80, desc="computing time per migrator"):
@@ -886,7 +886,9 @@ def _is_migrator_done(_mg_start, good_prs, time_per, pr_limit):
886886
return False
887887

888888

889-
def _run_migrator(migrator, mctx, temp, time_per, git_backend: GitPlatformBackend):
889+
def _run_migrator(
890+
migrator, mctx, temp, time_per, dry_run, git_backend: GitPlatformBackend
891+
):
890892
_mg_start = time.time()
891893

892894
migrator_name = get_migrator_name(migrator)
@@ -1028,7 +1030,8 @@ def _run_migrator(migrator, mctx, temp, time_per, git_backend: GitPlatformBacken
10281030
os.chdir(BOT_HOME_DIR)
10291031

10301032
# Write graph partially through
1031-
dump_graph(mctx.graph)
1033+
if not dry_run:
1034+
dump_graph(mctx.graph)
10321035

10331036
with filter_reprinted_lines("rm-tmp"):
10341037
for f in glob.glob("/tmp/*"):
@@ -1228,6 +1231,7 @@ def main(ctx: CliContext) -> None:
12281231
graph=gx,
12291232
smithy_version=smithy_version,
12301233
pinning_version=pinning_version,
1234+
dry_run=ctx.dry_run,
12311235
)
12321236
migrators = load_migrators()
12331237

@@ -1239,6 +1243,7 @@ def main(ctx: CliContext) -> None:
12391243
time_per_migrator,
12401244
tot_time_per_migrator,
12411245
) = _compute_time_per_migrator(
1246+
mctx,
12421247
migrators,
12431248
)
12441249
for i, migrator in enumerate(migrators):
@@ -1262,7 +1267,7 @@ def main(ctx: CliContext) -> None:
12621267

12631268
for mg_ind, migrator in enumerate(migrators):
12641269
good_prs = _run_migrator(
1265-
migrator, mctx, temp, time_per_migrator[mg_ind], git_backend
1270+
migrator, mctx, temp, time_per_migrator[mg_ind], ctx.dry_run, git_backend
12661271
)
12671272
if good_prs > 0:
12681273
pass

conda_forge_tick/contexts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class MigratorSessionContext:
2727
graph: DiGraph = None
2828
smithy_version: str = ""
2929
pinning_version: str = ""
30+
dry_run: bool = True
3031

3132

3233
@dataclass(frozen=True)

conda_forge_tick/status_report.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ def main() -> None:
404404
graph=gx,
405405
smithy_version=smithy_version,
406406
pinning_version=pinning_version,
407+
dry_run=False,
407408
)
408409
migrators = load_migrators(skip_paused=False)
409410

0 commit comments

Comments
 (0)