code-coordinator 0.5.348__py3-none-any.whl → 0.5.349__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/METADATA +1 -1
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/RECORD +8 -8
- coord/commands/release.py +99 -49
- coord/release_propagate.py +16 -0
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/WHEEL +0 -0
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/entry_points.txt +0 -0
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/licenses/LICENSE +0 -0
- {code_coordinator-0.5.348.dist-info → code_coordinator-0.5.349.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
code_coordinator-0.5.
|
|
1
|
+
code_coordinator-0.5.349.dist-info/licenses/LICENSE,sha256=851BVZZwf_pEv2ydSlMmcZrwnwSS5YJ98wdLze7lyL8,4212
|
|
2
2
|
coord/__init__.py,sha256=3FN2qrrxtW87xSsSD557YcMwHLDahnFK8LvqQI7Wlf4,9783
|
|
3
3
|
coord/_board_mapping.py,sha256=SGq8hC-gsyXHEZe2L58qy6pyOVQvswTpQ5FzPa_vZ8w,11012
|
|
4
4
|
coord/acceptance.py,sha256=v7k1e_shUIjWKolKDQ9oJv67o0O8L659El3grvcF8ns,75452
|
|
@@ -99,7 +99,7 @@ coord/reconcile.py,sha256=mxnJMPCdlOiQc_dgXuWXrmw98FVV6KrezxKPLvXxVqE,184654
|
|
|
99
99
|
coord/reconcile_tick.py,sha256=sQWfNcxetnC1vMWK0yKaqWW0HpBbDyKV5Tdc9yuWAVY,2908
|
|
100
100
|
coord/refine_chat.py,sha256=tg1SYrYirfzATz-NB_Kc61xMRY1eDtRy80K0aGtnksQ,17234
|
|
101
101
|
coord/release_cordon.py,sha256=5-VNe2bwR9vkvZLKiN39-y5db6W13V_z0Lcf3tAra3g,66753
|
|
102
|
-
coord/release_propagate.py,sha256=
|
|
102
|
+
coord/release_propagate.py,sha256=FKla9gcnWKTpGBHJsNY6HJOElPrEehP5sXAMQFgTwyo,86507
|
|
103
103
|
coord/release_verify.py,sha256=FoGqeszhO9hed5Iq439qz0mtfAA3VQOJAo_5zxI9dUc,40850
|
|
104
104
|
coord/release_window.py,sha256=g2flkEKjvFM-mMhKGOConJCwpNP_vlZWo5A9fVGGmAk,22688
|
|
105
105
|
coord/repo_dormancy.py,sha256=gtMxkBfvu7Qbg45SiCOyYnz2X2stfVca3R9oXTqONXw,9147
|
|
@@ -153,7 +153,7 @@ coord/commands/plan_followup.py,sha256=WZmgEBuigLByqRn7eMQpz5GGkqhwvA0nhS1s95lVY
|
|
|
153
153
|
coord/commands/plans.py,sha256=OxcMyDWIhFFiA13lbxOGOscLXckgZqEy6FfzRSRrm00,5408
|
|
154
154
|
coord/commands/portal.py,sha256=hUPRvwHKxD7bT8usQel6UKTp3HR03UED7Yw4_-JkPUo,98580
|
|
155
155
|
coord/commands/pr.py,sha256=cMG1FXi28E5lUfw-jhR_Go3kf0pAMVNLsTRsQUu99D8,15200
|
|
156
|
-
coord/commands/release.py,sha256=
|
|
156
|
+
coord/commands/release.py,sha256=EHPX5baMVvaL9bZR8MRUDXsncSyawwkI29TllBX7yds,183181
|
|
157
157
|
coord/commands/repo.py,sha256=L6f7zEhI2R2MDxEtpR1q_w5P2N_etprH96sR5aDwQPI,94233
|
|
158
158
|
coord/commands/report.py,sha256=izIz1Iiq2VaPM9liSgRor2SpRCiLMz83LGu2Y2UeVkU,14140
|
|
159
159
|
coord/commands/review.py,sha256=F4iuitXstg-Dx6u1ANXb5GQkJ-Wj3q-IWCXZUwlaXck,68305
|
|
@@ -253,8 +253,8 @@ coord/skills/release-now/SKILL.md,sha256=u5JY0Jm0IiZYs2JGjRSqNj265CUWcIA6pMaeulb
|
|
|
253
253
|
coord/skills/review-verdict-recovery/SKILL.md,sha256=Grg8GWkJLK20ct2YiigbTFfNOkit7tNrdRIhdocKGJk,3941
|
|
254
254
|
coord/skills/tui-quadraui-workflow/SKILL.md,sha256=4hUZza9wSSnPhf0eRAOh2r_MQZxK2pXYO5g-kxmJq-U,3832
|
|
255
255
|
coord/skills/update-issue/SKILL.md,sha256=VrPinEmLZrCSNDrnz96hQomyO403o5c4i0RdsnUnWA0,3642
|
|
256
|
-
code_coordinator-0.5.
|
|
257
|
-
code_coordinator-0.5.
|
|
258
|
-
code_coordinator-0.5.
|
|
259
|
-
code_coordinator-0.5.
|
|
260
|
-
code_coordinator-0.5.
|
|
256
|
+
code_coordinator-0.5.349.dist-info/METADATA,sha256=3x-TtSOvougBd-NLcIGMEU454byd3o2hHhtuK9GVGNs,27178
|
|
257
|
+
code_coordinator-0.5.349.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
258
|
+
code_coordinator-0.5.349.dist-info/entry_points.txt,sha256=o-Hq8pvG7ReGePvN_4iOKjLNqiq-MJ43HbPurqjNPZo,41
|
|
259
|
+
code_coordinator-0.5.349.dist-info/top_level.txt,sha256=w5sTrXesTCebhXyYv2qufOZGo0PoD1Lxgn0Q3MAXjh4,6
|
|
260
|
+
code_coordinator-0.5.349.dist-info/RECORD,,
|
coord/commands/release.py
CHANGED
|
@@ -1031,6 +1031,82 @@ def release_propagate( # noqa: PLR0912, PLR0915 — a pipeline; the decisions a
|
|
|
1031
1031
|
click.echo("\n".join(rp.render_record(record)))
|
|
1032
1032
|
sys.exit(exit_code)
|
|
1033
1033
|
|
|
1034
|
+
def _scope_gate(report) -> "rp.GateVerdict":
|
|
1035
|
+
"""Score *report* against this run's own attempts, print advisories
|
|
1036
|
+
with their remedy, and stamp both onto *record* (#3048).
|
|
1037
|
+
|
|
1038
|
+
Shared by the post-roll gate (step 5, the only caller before #3048)
|
|
1039
|
+
AND every early deferral above it. #3048: dell64 sat cordoned and
|
|
1040
|
+
idle for a whole roll while `coord release propagate` rolled the
|
|
1041
|
+
other three hosts fine and said nothing about it — because the run
|
|
1042
|
+
that found nothing to attempt (`if not rolls:`) exited via
|
|
1043
|
+
`_finish()` before ever reaching step 5, so the CRIT this same
|
|
1044
|
+
run's own `before` sweep already had in hand (dell64 on 0.5.335,
|
|
1045
|
+
expected 0.5.341) never got scored or printed. It surfaced only
|
|
1046
|
+
because an operator happened to run `coord release verify`
|
|
1047
|
+
separately.
|
|
1048
|
+
|
|
1049
|
+
Calling this wherever `record.lanes` reflects "nothing attempted so
|
|
1050
|
+
far" is always safe: :func:`~coord.release_propagate.
|
|
1051
|
+
attempted_scope` only counts rows this run actually rolled
|
|
1052
|
+
(``ok`` is not ``None`` and not flagged ``unrollable``), so at any
|
|
1053
|
+
point before the roll loop it is empty by construction and every
|
|
1054
|
+
CRIT the report carries scores as advisory — the exact shape the
|
|
1055
|
+
post-roll gate already knew how to report, just reached sooner.
|
|
1056
|
+
"""
|
|
1057
|
+
gate = rp.scope_verification(report.to_dict(), lanes=record.lanes)
|
|
1058
|
+
record.verification = report.to_dict()
|
|
1059
|
+
record.gate = gate.to_dict()
|
|
1060
|
+
for finding in gate.advisory:
|
|
1061
|
+
host = finding.get("host")
|
|
1062
|
+
# #2403: elitebook sat on 0.5.146 (expected 0.5.148) for the
|
|
1063
|
+
# length of a cordon's full lifetime with this line as the ONLY
|
|
1064
|
+
# signal an operator got — "fix by hand" with no hand to
|
|
1065
|
+
# follow. When the finding names a host, name the two commands
|
|
1066
|
+
# that actually clear it, so nobody has to derive them from
|
|
1067
|
+
# scratch under time pressure.
|
|
1068
|
+
#
|
|
1069
|
+
# #2963: that fixed remedy is `coord agent update` — which
|
|
1070
|
+
# swaps the venv and nothing else — for EVERY advisory finding,
|
|
1071
|
+
# including ones on the `units` lane (`unit
|
|
1072
|
+
# coord-agent.service`, #1831/#1927). `coord agent update`
|
|
1073
|
+
# never installs a unit file, so printing it for a stale-unit
|
|
1074
|
+
# finding sent an operator to run the one command guaranteed
|
|
1075
|
+
# not to fix it (#2938's `Restart=always` fix shipped in four
|
|
1076
|
+
# releases and reached zero hosts' live systemd). The units
|
|
1077
|
+
# lane's own health check (`coord.health.checks.unit_drift`)
|
|
1078
|
+
# already computed the exact per-host, per-unit remedy into
|
|
1079
|
+
# `detail` — reuse it here instead of fabricating a wrong one.
|
|
1080
|
+
lane = str(finding.get("lane") or "")
|
|
1081
|
+
if rp.verify_lane_kind(lane) == rp.LANE_UNITS:
|
|
1082
|
+
own_detail = str(finding.get("detail") or "").strip()
|
|
1083
|
+
remedy = (
|
|
1084
|
+
f" — {own_detail}"
|
|
1085
|
+
if own_detail
|
|
1086
|
+
else " — run `coord release propagate --lane units` to "
|
|
1087
|
+
"install it (mask-safe since #2812)"
|
|
1088
|
+
)
|
|
1089
|
+
else:
|
|
1090
|
+
remedy = (
|
|
1091
|
+
f" — run `coord agent update --machine {host}` then "
|
|
1092
|
+
f"`coord release cordon --clear {host}`"
|
|
1093
|
+
if host
|
|
1094
|
+
else ""
|
|
1095
|
+
)
|
|
1096
|
+
click.echo(
|
|
1097
|
+
f" ~ advisory [{finding.get('severity')}] {host} "
|
|
1098
|
+
f"{finding.get('lane')}: {finding.get('summary')} "
|
|
1099
|
+
f"— outside propagation's reach, fix by hand{remedy}",
|
|
1100
|
+
err=True,
|
|
1101
|
+
)
|
|
1102
|
+
if gate.unrollable:
|
|
1103
|
+
click.echo(
|
|
1104
|
+
" ~ lanes with no channel from this host: "
|
|
1105
|
+
+ ", ".join(gate.unrollable),
|
|
1106
|
+
err=True,
|
|
1107
|
+
)
|
|
1108
|
+
return gate
|
|
1109
|
+
|
|
1034
1110
|
# ── 1. what version are we propagating? ──────────────────────────────
|
|
1035
1111
|
index_url = getattr(getattr(config, "health", None), "pypi_index_url",
|
|
1036
1112
|
"https://pypi.org/simple")
|
|
@@ -1221,6 +1297,14 @@ def release_propagate( # noqa: PLR0912, PLR0915 — a pipeline; the decisions a
|
|
|
1221
1297
|
# must be visibly *working*, not visibly failing. #2101: and now it
|
|
1222
1298
|
# has cordoned whatever is behind on the way past, so the next tick
|
|
1223
1299
|
# meets a fleet that is actually draining.
|
|
1300
|
+
#
|
|
1301
|
+
# #3048: score `before` — the sweep already paid for above, ahead
|
|
1302
|
+
# of cordoning — before finishing, so a host this run could never
|
|
1303
|
+
# have reached anyway (busy for a reason that will never resolve
|
|
1304
|
+
# on its own) prints its CRIT and remedy NOW rather than staying
|
|
1305
|
+
# invisible until an operator happens to run `coord release
|
|
1306
|
+
# verify` or `coord status` separately.
|
|
1307
|
+
_scope_gate(before)
|
|
1224
1308
|
_finish(rp.STATUS_DEFERRED, 0)
|
|
1225
1309
|
|
|
1226
1310
|
# #2101: this refusal is checked AFTER the deferral above, deliberately.
|
|
@@ -1273,6 +1357,11 @@ def release_propagate( # noqa: PLR0912, PLR0915 — a pipeline; the decisions a
|
|
|
1273
1357
|
min_releases_behind=effective_min_behind, dry_run=dry_run,
|
|
1274
1358
|
queue_provably_busy=_queue_provably_busy(quiescence, daemon_name),
|
|
1275
1359
|
)
|
|
1360
|
+
# #3048: this defer holds back EVERY host's lanes this tick, not
|
|
1361
|
+
# just the daemon's — score `before` now so any of them already
|
|
1362
|
+
# outside propagation's reach says so immediately instead of
|
|
1363
|
+
# waiting for a tick that finally reaches step 5.
|
|
1364
|
+
_scope_gate(before)
|
|
1276
1365
|
_finish(rp.STATUS_DEFERRED, 0)
|
|
1277
1366
|
|
|
1278
1367
|
still_busy = busy_hosts - set(current)
|
|
@@ -1316,6 +1405,15 @@ def release_propagate( # noqa: PLR0912, PLR0915 — a pipeline; the decisions a
|
|
|
1316
1405
|
_finish(rp.STATUS_DEFERRED if still_busy else rp.STATUS_UP_TO_DATE, 0)
|
|
1317
1406
|
|
|
1318
1407
|
if not rolls:
|
|
1408
|
+
# #3048: dell64 sat cordoned and idle, behind the target, while
|
|
1409
|
+
# this exact branch fired tick after tick — every OTHER behind
|
|
1410
|
+
# host had already rolled and gone `current`, so `rolls` came back
|
|
1411
|
+
# empty and the run finished right here without ever reaching step
|
|
1412
|
+
# 5's gate. Score `before` now, the same sweep already paid for in
|
|
1413
|
+
# step 3 (before cordoning), so a host stuck outside propagation's
|
|
1414
|
+
# reach says so on THIS tick instead of staying silent until an
|
|
1415
|
+
# operator happens to run `coord release verify` by hand.
|
|
1416
|
+
_scope_gate(before)
|
|
1319
1417
|
_finish(rp.STATUS_DEFERRED if still_busy else rp.STATUS_UP_TO_DATE, 0)
|
|
1320
1418
|
|
|
1321
1419
|
# ── 4. roll, in the planned order ────────────────────────────────────
|
|
@@ -1435,59 +1533,11 @@ def release_propagate( # noqa: PLR0912, PLR0915 — a pipeline; the decisions a
|
|
|
1435
1533
|
daemon_host=daemon_facts, daemon_host_name=daemon_label,
|
|
1436
1534
|
expected=record.target_version,
|
|
1437
1535
|
)
|
|
1438
|
-
record.verification = after.to_dict()
|
|
1439
1536
|
|
|
1440
1537
|
# #2052: the gate is scoped to the lanes this run attempted and could
|
|
1441
1538
|
# have moved. The full report above is still journalled verbatim — this
|
|
1442
1539
|
# narrows what may TRIGGER a rollback, not what gets reported.
|
|
1443
|
-
gate =
|
|
1444
|
-
record.gate = gate.to_dict()
|
|
1445
|
-
for finding in gate.advisory:
|
|
1446
|
-
host = finding.get("host")
|
|
1447
|
-
# #2403: elitebook sat on 0.5.146 (expected 0.5.148) for the length
|
|
1448
|
-
# of a cordon's full lifetime with this line as the ONLY signal an
|
|
1449
|
-
# operator got — "fix by hand" with no hand to follow. When the
|
|
1450
|
-
# finding names a host, name the two commands that actually clear
|
|
1451
|
-
# it, so nobody has to derive them from scratch under time pressure.
|
|
1452
|
-
#
|
|
1453
|
-
# #2963: that fixed remedy is `coord agent update` — which swaps
|
|
1454
|
-
# the venv and nothing else — for EVERY advisory finding, including
|
|
1455
|
-
# ones on the `units` lane (`unit coord-agent.service`, #1831/#1927).
|
|
1456
|
-
# `coord agent update` never installs a unit file, so printing it
|
|
1457
|
-
# for a stale-unit finding sent an operator to run the one command
|
|
1458
|
-
# guaranteed not to fix it (#2938's `Restart=always` fix shipped in
|
|
1459
|
-
# four releases and reached zero hosts' live systemd). The units
|
|
1460
|
-
# lane's own health check (`coord.health.checks.unit_drift`) already
|
|
1461
|
-
# computed the exact per-host, per-unit remedy into `detail` — reuse
|
|
1462
|
-
# it here instead of fabricating a wrong one.
|
|
1463
|
-
lane = str(finding.get("lane") or "")
|
|
1464
|
-
if rp.verify_lane_kind(lane) == rp.LANE_UNITS:
|
|
1465
|
-
own_detail = str(finding.get("detail") or "").strip()
|
|
1466
|
-
remedy = (
|
|
1467
|
-
f" — {own_detail}"
|
|
1468
|
-
if own_detail
|
|
1469
|
-
else " — run `coord release propagate --lane units` to "
|
|
1470
|
-
"install it (mask-safe since #2812)"
|
|
1471
|
-
)
|
|
1472
|
-
else:
|
|
1473
|
-
remedy = (
|
|
1474
|
-
f" — run `coord agent update --machine {host}` then "
|
|
1475
|
-
f"`coord release cordon --clear {host}`"
|
|
1476
|
-
if host
|
|
1477
|
-
else ""
|
|
1478
|
-
)
|
|
1479
|
-
click.echo(
|
|
1480
|
-
f" ~ advisory [{finding.get('severity')}] {host} "
|
|
1481
|
-
f"{finding.get('lane')}: {finding.get('summary')} "
|
|
1482
|
-
f"— outside propagation's reach, fix by hand{remedy}",
|
|
1483
|
-
err=True,
|
|
1484
|
-
)
|
|
1485
|
-
if gate.unrollable:
|
|
1486
|
-
click.echo(
|
|
1487
|
-
" ~ lanes with no channel from this host: "
|
|
1488
|
-
+ ", ".join(gate.unrollable),
|
|
1489
|
-
err=True,
|
|
1490
|
-
)
|
|
1540
|
+
gate = _scope_gate(after)
|
|
1491
1541
|
|
|
1492
1542
|
if gate.red and rollback_on_red:
|
|
1493
1543
|
# #1835: "a red post-deploy verification must roll back, not just
|
coord/release_propagate.py
CHANGED
|
@@ -397,6 +397,22 @@ RESTARTED_BY_PYTHON_LANE: frozenset[str] = frozenset(
|
|
|
397
397
|
#: reachable lane is: blocking exactly when this run attempted that host's
|
|
398
398
|
#: python lane. Shrinking this set is exactly how new coverage is meant to
|
|
399
399
|
#: re-arm the gate (see the module docstring above).
|
|
400
|
+
#:
|
|
401
|
+
#: #3048 checked whether this set was overreaching for a host whose
|
|
402
|
+
#: ``~/.coord-venv``/``coord-agent`` is reachable over the agent API on
|
|
403
|
+
#: 7433 (dell64: cordoned, idle, a plain ``POST /update`` fixed it in
|
|
404
|
+
#: seconds once someone finally issued one). It is not — ``~/.coord-venv``,
|
|
405
|
+
#: ``coord-agent process`` and ``coord-agent spawns`` were never in this
|
|
406
|
+
#: set; they are ``LANE_PYTHON`` via :data:`_VERIFY_LANE_EXACT`, a lane
|
|
407
|
+
#: this module has always known how to roll. dell64's finding was scored
|
|
408
|
+
#: ADVISORY only because THIS run never attempted it (busy, or — #3048's
|
|
409
|
+
#: actual fix — a run that reached ``if not rolls:`` before ever calling
|
|
410
|
+
#: :func:`scope_verification` at all, see ``coord/commands/release.py``'s
|
|
411
|
+
#: ``_scope_gate``), never because ``lane_is_out_of_reach`` misjudged the
|
|
412
|
+
#: lane itself. Grow this set only for a lane with genuinely no remote
|
|
413
|
+
#: install path — the ``tui`` lane's per-host binary is the honest case
|
|
414
|
+
#: (``coord tui update`` has to run ON the host); a reachable venv is not
|
|
415
|
+
#: that case and must not be added here.
|
|
400
416
|
OUT_OF_REACH_LANES: frozenset[str] = frozenset({"~/.coord-cli-venv", "webapp bundle"})
|
|
401
417
|
|
|
402
418
|
#: ``"~/.coord-venv (precision)"`` — the label `coord release verify` builds
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|