rosotacom-dev 2.5.dev7__py3-none-any.whl → 2.5.dev8__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.
- rosotacom/cli.py +50 -0
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/METADATA +1 -1
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/RECORD +7 -7
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/WHEEL +0 -0
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/entry_points.txt +0 -0
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/licenses/LICENSE.txt +0 -0
- {rosotacom_dev-2.5.dev7.dist-info → rosotacom_dev-2.5.dev8.dist-info}/top_level.txt +0 -0
rosotacom/cli.py
CHANGED
|
@@ -2319,6 +2319,30 @@ def _infer_active_ota_smoke_run(
|
|
|
2319
2319
|
)
|
|
2320
2320
|
|
|
2321
2321
|
|
|
2322
|
+
def _ota_latest_state_for(
|
|
2323
|
+
runtime: RuntimeConfig, target: InteractiveSmokeTarget, instance_id: str | None
|
|
2324
|
+
) -> str | None:
|
|
2325
|
+
"""The newest `ota-deployment.yaml` for this target, if one is on disk.
|
|
2326
|
+
|
|
2327
|
+
Instances are laid out `<instances>/<date>/<session>_<time>_<instance-id>/`,
|
|
2328
|
+
so a named instance can be matched by suffix and an unnamed one by
|
|
2329
|
+
modification time. Returns None rather than raising: not finding a state is
|
|
2330
|
+
a normal outcome (nothing was ever started here), and the caller has a
|
|
2331
|
+
command line to fall back to.
|
|
2332
|
+
"""
|
|
2333
|
+
root = _session_instances_root(runtime)
|
|
2334
|
+
if not root.is_dir():
|
|
2335
|
+
return None
|
|
2336
|
+
candidates = sorted(
|
|
2337
|
+
(path for path in root.glob("*/*/ota-deployment.yaml")),
|
|
2338
|
+
key=lambda path: path.stat().st_mtime,
|
|
2339
|
+
reverse=True,
|
|
2340
|
+
)
|
|
2341
|
+
if instance_id:
|
|
2342
|
+
candidates = [path for path in candidates if path.parent.name.endswith(f"_{instance_id}")]
|
|
2343
|
+
return str(candidates[0]) if candidates else None
|
|
2344
|
+
|
|
2345
|
+
|
|
2322
2346
|
def _resolve_ota_smoke_context(
|
|
2323
2347
|
args: argparse.Namespace,
|
|
2324
2348
|
) -> tuple[RuntimeConfig, OtaSmokePlan, InteractiveSmokeTarget]:
|
|
@@ -2327,6 +2351,21 @@ def _resolve_ota_smoke_context(
|
|
|
2327
2351
|
getattr(args, "target", None), runtime, getattr(args, "target_type", "auto")
|
|
2328
2352
|
)
|
|
2329
2353
|
state_file = getattr(args, "state_file", None)
|
|
2354
|
+
if not state_file and getattr(args, "stop", False):
|
|
2355
|
+
# Stopping has to reach the run that exists, and the only record of how
|
|
2356
|
+
# that run was deployed is the state a start wrote. Reconstructing a
|
|
2357
|
+
# plan from the command line instead means guessing the install mode,
|
|
2358
|
+
# and the default guess is `source` — which points the stop at
|
|
2359
|
+
# `/tmp/rosotacom_ota/source/.venv/bin/rosotacom` for peers that were
|
|
2360
|
+
# started from their own checkouts. Observed on 2026-08-11: every peer
|
|
2361
|
+
# stop failed silently (they are best-effort), the containers stayed up,
|
|
2362
|
+
# and the only visible action was a cleanup removing a staging directory
|
|
2363
|
+
# that had never been created. Usually the live tmux session carries the
|
|
2364
|
+
# state path; when it does not — a killed session, a run started from
|
|
2365
|
+
# another terminal — the instance directory still does.
|
|
2366
|
+
state_file = _ota_latest_state_for(runtime, target, getattr(args, "instance_id", None))
|
|
2367
|
+
if state_file:
|
|
2368
|
+
print(f"OTA smoke: stopping the run recorded in {state_file}")
|
|
2330
2369
|
if state_file:
|
|
2331
2370
|
plan = _ota_load_state(state_file)
|
|
2332
2371
|
else:
|
|
@@ -3594,6 +3633,17 @@ def _list_ota_smoke(args: argparse.Namespace) -> int:
|
|
|
3594
3633
|
|
|
3595
3634
|
|
|
3596
3635
|
def _ota_cleanup_hosts(plan: OtaSmokePlan, *, dry_run: bool) -> None:
|
|
3636
|
+
if plan.state_path is None:
|
|
3637
|
+
# No recorded state means this plan came from the command line, so its
|
|
3638
|
+
# install mode is a default rather than a fact about the run. Removing a
|
|
3639
|
+
# workdir on that basis is a destructive act taken on a guess: it is how
|
|
3640
|
+
# a stop that reached no peer still reported doing something. Say what
|
|
3641
|
+
# is missing instead.
|
|
3642
|
+
print(
|
|
3643
|
+
"OTA smoke: skipping cleanup — no deployment state for this run, so its install mode is unknown. "
|
|
3644
|
+
"Pass --state-file if a workdir really needs removing."
|
|
3645
|
+
)
|
|
3646
|
+
return
|
|
3597
3647
|
if plan.install_mode == "checkout":
|
|
3598
3648
|
# The workdir is the user's repository here. `rm -rf` on it would delete
|
|
3599
3649
|
# a checkout with its untracked work — bags, instance artefacts, local
|
|
@@ -5,7 +5,7 @@ rosotacom/bag_ground_truth.py,sha256=FlL34fA2CWZZxsrz7uxfhPt2VntPuS0ldrOPy58XPMk
|
|
|
5
5
|
rosotacom/benched_set.py,sha256=PGybWzNKJhg5wouIGo_zxlb7Fu41UzmtgEBxUR-Gkvg,19874
|
|
6
6
|
rosotacom/benchmark.py,sha256=Xda8WwFKQEIRMO0Qe1Hf7rvykYIgM86gUHBuyX9VvI8,74447
|
|
7
7
|
rosotacom/bundle_check.py,sha256=l_3BSuYk6juXQmsNU6jkxRbH8ayH2GkiW9ONKMQ1oJY,18270
|
|
8
|
-
rosotacom/cli.py,sha256=
|
|
8
|
+
rosotacom/cli.py,sha256=EdI5LzykldhQtSvgXGujc4x5MKkNGTTeMO531Z1Bhbw,374958
|
|
9
9
|
rosotacom/cli_benchmark.py,sha256=bhdtvvO73g3-vlWTX0hf7I70lKQVT0pyXbIg3YnXfLQ,342197
|
|
10
10
|
rosotacom/deployment.py,sha256=XVhB8JjxhAsglSEEPtiVSeV6fCG0rgGmDRulh14oIYQ,7318
|
|
11
11
|
rosotacom/ffmpeg_packet.py,sha256=zB1BHgY1kexr5sETVMkm4bkVnRytj9k2t0uOYiHUZ6M,4267
|
|
@@ -187,9 +187,9 @@ rosotacom/resources/ws/session/creation/generate_session_files.py,sha256=R4HFetZ
|
|
|
187
187
|
rosotacom/resources/ws/session/creation/run_session.py,sha256=G2hJhrmLp11gm3JZ6_C-zZcqu_reXlE_wmobB7BiCfU,16849
|
|
188
188
|
rosotacom/resources/ws/session/creation/run_session_in_external_terminal.py,sha256=Ub_5f-ttUUc-rAPrZmg_Op34s8Z4C91hTyEn8fgyt-E,2633
|
|
189
189
|
rosotacom/resources/ws/session/creation/strip_ansi.py,sha256=vNjpemcq4xHr0VG4x0bZqvgwEBEfOgN-b4PzbrM5nfM,851
|
|
190
|
-
rosotacom_dev-2.5.
|
|
191
|
-
rosotacom_dev-2.5.
|
|
192
|
-
rosotacom_dev-2.5.
|
|
193
|
-
rosotacom_dev-2.5.
|
|
194
|
-
rosotacom_dev-2.5.
|
|
195
|
-
rosotacom_dev-2.5.
|
|
190
|
+
rosotacom_dev-2.5.dev8.dist-info/licenses/LICENSE.txt,sha256=FDB3-fao3lqZ94wsJHKAH7U88kAnfvZhZC8Hm5rN__g,1459
|
|
191
|
+
rosotacom_dev-2.5.dev8.dist-info/METADATA,sha256=8BAMzG6eg_v8eDDaWqbmBL1_qijiEMDEBfZfg_h1Ais,47834
|
|
192
|
+
rosotacom_dev-2.5.dev8.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
193
|
+
rosotacom_dev-2.5.dev8.dist-info/entry_points.txt,sha256=-Hl9WKAfkLjMHUonDTxvz86EgSfZf6oyatRMxypS5iA,147
|
|
194
|
+
rosotacom_dev-2.5.dev8.dist-info/top_level.txt,sha256=BZrtQcIVDWn_pQZR3Mlssqy5SaRXHjOa6B-1D9Fy4Ao,10
|
|
195
|
+
rosotacom_dev-2.5.dev8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|