From c024148f361ab8a8859b39336c0a5aa6f82c5fd8 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 14:48:43 +0200 Subject: [PATCH 1/2] Version updates: report version for pending updates, remove 'errored' set (redundant wiht 'errors.keys()') --- conda_forge_tick/status_report.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/conda_forge_tick/status_report.py b/conda_forge_tick/status_report.py index 689dde47a..32557b0d8 100644 --- a/conda_forge_tick/status_report.py +++ b/conda_forge_tick/status_report.py @@ -67,10 +67,9 @@ def _ok_version(ver): def write_version_migrator_status(migrator, mctx): """write the status of the version migrator""" - out: Dict[str, Any] = { - "queued": set(), - "errored": set(), - "errors": {}, + out: Dict[str, Dict[str, str]] = { + "queued": {}, # name -> pending version + "errors": {}, # name -> error } gx = mctx.graph @@ -109,9 +108,8 @@ def write_version_migrator_status(migrator, mctx): ): attempts = vpri.get("new_version_attempts", {}).get(new_version, 0) if attempts == 0: - out["queued"].add(node) + out["queued"][node] = new_version else: - out["errored"].add(node) out["errors"][node] = f"{attempts:.2f} attempts - " + vpri.get( "new_version_errors", {}, From 44d60324af3f33d6e2246e0cc1d1e5767faf36d2 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 15:39:16 +0200 Subject: [PATCH 2/2] Add versioned payloads for bw compat --- conda_forge_tick/status_report.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conda_forge_tick/status_report.py b/conda_forge_tick/status_report.py index 32557b0d8..a938e784f 100644 --- a/conda_forge_tick/status_report.py +++ b/conda_forge_tick/status_report.py @@ -120,6 +120,12 @@ def write_version_migrator_status(migrator, mctx): ) with open("./status/version_status.json", "w") as f: + old_out = out.copy() + old_out["queued"] = set(out["queued"].keys()) + old_out["errored"] = set(out["errors"].keys()) + json.dump(old_out, f, sort_keys=True, indent=2, default=_sorted_set_json) + + with open("./status/version_status.v2.json", "w") as f: json.dump(out, f, sort_keys=True, indent=2, default=_sorted_set_json)