Skip to content

Commit c61b753

Browse files
authored
Revert "minor fixes"
1 parent eedaf0f commit c61b753

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"], pr_lazy_json
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"):
@@ -885,7 +885,9 @@ def _is_migrator_done(_mg_start, good_prs, time_per, pr_limit):
885885
return False
886886

887887

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

891893
migrator_name = get_migrator_name(migrator)
@@ -1026,7 +1028,8 @@ def _run_migrator(migrator, mctx, temp, time_per, git_backend: GitPlatformBacken
10261028
os.chdir(BOT_HOME_DIR)
10271029

10281030
# Write graph partially through
1029-
dump_graph(mctx.graph)
1031+
if not dry_run:
1032+
dump_graph(mctx.graph)
10301033

10311034
with filter_reprinted_lines("rm-tmp"):
10321035
for f in glob.glob("/tmp/*"):
@@ -1226,6 +1229,7 @@ def main(ctx: CliContext) -> None:
12261229
graph=gx,
12271230
smithy_version=smithy_version,
12281231
pinning_version=pinning_version,
1232+
dry_run=ctx.dry_run,
12291233
)
12301234
migrators = load_migrators()
12311235

@@ -1237,6 +1241,7 @@ def main(ctx: CliContext) -> None:
12371241
time_per_migrator,
12381242
tot_time_per_migrator,
12391243
) = _compute_time_per_migrator(
1244+
mctx,
12401245
migrators,
12411246
)
12421247
for i, migrator in enumerate(migrators):
@@ -1260,7 +1265,7 @@ def main(ctx: CliContext) -> None:
12601265

12611266
for mg_ind, migrator in enumerate(migrators):
12621267
good_prs = _run_migrator(
1263-
migrator, mctx, temp, time_per_migrator[mg_ind], git_backend
1268+
migrator, mctx, temp, time_per_migrator[mg_ind], ctx.dry_run, git_backend
12641269
)
12651270
if good_prs > 0:
12661271
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
@@ -402,6 +402,7 @@ def main() -> None:
402402
graph=gx,
403403
smithy_version=smithy_version,
404404
pinning_version=pinning_version,
405+
dry_run=False,
405406
)
406407
migrators = load_migrators(skip_paused=False)
407408

0 commit comments

Comments
 (0)