caffeinated-whale-cli 3.6.1__tar.gz → 3.7.0__tar.gz
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.
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/PKG-INFO +29 -9
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/README.md +28 -8
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/pyproject.toml +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/__init__.py +1 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/serve.py +4 -1
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/status.py +194 -12
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/update.py +5 -5
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/app_catalog.py +122 -27
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/bench_ops.py +97 -16
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/community.py +6 -1
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/credbridge.py +36 -5
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/doctor.py +5 -2
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/fleet.py +52 -2
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/git_refs.py +50 -11
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/hosts.py +4 -0
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/core/maintenance.py +1001 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/publish.py +87 -15
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/status.py +103 -65
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/supervision.py +7 -1
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/update.py +6 -2
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/update_preflight.py +8 -5
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/jobs.py +22 -18
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/cred_daemon.py +84 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/db_utils.py +6 -3
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Advisories-CBgZMwoM.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-8RIVvbEM.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-T5yTpJS_.js +1 -0
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-D62h5KGN.js +1 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Backups-CXylE2hz.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-nWhVDOjg.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-BuSJ6bIs.js +3 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-BpVXcqf6.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-DcP1mnTc.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-C8wxDC1C.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-Bkn582fa.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-BayYhh_a.js +1 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Instances-CJfx2228.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-Bd-qQu00.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Job-BYIH7Rp8.js +3 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/JobState-CGY7L4t8.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-BUjTqh1j.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Jobs-mqf4ySNT.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-CX6MSlBD.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-Cg8R_3zW.js +1 -0
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-B4MRN42x.js +1 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PageHead-ywkLInll.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead--9AlqJjw.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-BdNq_puu.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-COKQqRho.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-BuHUhl3r.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-DYSWFcx1.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-DnzlCsvD.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-CAGEU_an.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Schedules-CNxjmssz.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-Bxvm1y_i.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Site-BxDY0kWk.js +9 -0
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-DQwpr9rz.js +3 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-BP3gtvhb.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-BliWFnWq.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-CFzuYIvo.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-BrVhoWDB.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-CMG2Wd6w.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-ClNJlH_y.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/index-DJGtLAcx.js +39 -0
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/index-D3Z22wSo.css → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/index-zXyVnhY-.css +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BN1T1yXA.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BPlc9fjT.js +1 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/tabs-DftXRAc4.js → caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-CeZNoJQO.js +1 -1
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/index.html +2 -2
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli.egg-info/SOURCES.txt +29 -28
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/__init__.py +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-BObY_ijk.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Apps-BPPyCuW1.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Bench-CBUzHhFz.js +0 -3
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/DevModeBadge-ByEvdhaS.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Instance-B7fJ6p1L.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Job-ByQ4ybGX.js +0 -3
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-hOfO_scP.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Site-5FDMZIun.js +0 -9
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Sites-C5CVzP_x.js +0 -1
- caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/index-CyatF_BF.js +0 -39
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/LICENSE +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/setup.cfg +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/__main__.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/bridge.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/__init__.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/admin.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/apps.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/axi.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/backup.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/backups.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/config.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/db_access.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/deps_ui.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/doctor.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/init.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/inspect.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/integrations.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/label.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/list.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/logs.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/new_bench.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/new_site.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/open.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/remote.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/restart.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/restore.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/rm.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/rm_site.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/run.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/scale.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/schedule.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/self_update.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/setup.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/start.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/stop.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/ui.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/unlock.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/commands/where.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/__init__.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/accounts.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/advisories.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/app_deps.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/apps.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/auto_inspect.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/backup.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/backup_crypto.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/backup_drill.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/backup_store.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/bench_read.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/cloudflare.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/config.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/cred_bridge.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/daemon_recovery.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/db_access.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/db_password.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/directory.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/docker.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/editors.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/envelope.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/errors.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/exec_stream.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/failure_causes.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/init.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/inspect.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/integrations.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/label.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/ldap_client.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/list.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/logs.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/metrics.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/new_bench.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/new_site.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/npm.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/open.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/protocol.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/remote_access.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/resolvers.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/restart.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/restore.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/rm.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/rm_site.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/run.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/s3.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/scale.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/schedules.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/self_update.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/setup.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/site_icons.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/site_logs.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/start.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/stop.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/transfer.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/unlock.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/updates.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/url.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/version.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/webapi.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/core/where.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/main.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/update_notice.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/__init__.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/agent_hooks.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/auto_inspect.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/bench_labels.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/bench_sites.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/cache.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/completion_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/config_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/console.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/daemon_identity.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/docker_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/port_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/sendme_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/shared_home.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/signals.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/startup.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/tips.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/toon.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/utils/vscode_utils.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/__init__.py +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter-Italic.var-BGHziHgI.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter.var-C9xDBOS3.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/ListRows-CejsiiPF.css +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/code-insiders--L5huIRx.svg +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/code-ofeWxTsy.svg +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/cursor-jGcLH-b0.svg +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/assets/opsz-DreOFYE_.css +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/csp.json +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/logo-whale.png +0 -0
- {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.7.0}/src/caffeinated_whale_cli/webui/dist/theme-boot.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: caffeinated-whale-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.7.0
|
|
4
4
|
Summary: A CLI tool to help manage Frappe Docker instances.
|
|
5
5
|
Author-email: Christopher McKay <mckay.christopher73@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -196,6 +196,7 @@ The per-user SQLite cache is regenerable (`cwcli inspect`) and deliberately not
|
|
|
196
196
|
- **`cwcli` group membership is the trust boundary.** Anyone in the group can read every instance's cache, read the rm/rm-site backups (which contain full database dumps), edit the shared config, and - with `--cred-bridge` - ask the machine-wide bridge for a credential. This is the same "docker group ≈ root-ish capability" trade every shared dev tool makes. Keep membership deliberate.
|
|
197
197
|
- **The credential bridge in shared mode serves one machine-owned, read-only service-account token** to any group member's container git, so its audit log records the host and project but **not which human** triggered a fetch (they all present as the service account). Provision that account with a read-only deploy token; rotate it in one place if it leaks.
|
|
198
198
|
- **The shared credential is also the default for cwcli's own fetches.** `cwcli init --frappe-url <private fork>`, `apps install`, `apps update`, and `apps checkout` first wire the instance into the machine-wide bridge, so a member who never signed in to `gh`/`glab` personally can still fetch a private repo. A member's own `gh`/`glab` sign-in is only the automatic fallback, used when the shared credential answers nothing for that host (for example a host missing from `allowed_hosts`, or the bridge daemon is down), and cwcli prints one line on stderr when it falls back.
|
|
199
|
+
- **The web UI's app catalog reads the shared credential first, too.** The bridge daemon serves one machine-wide socket in the shared run directory (group-gated like the per-instance ones), and the catalog's forge scan, an app's branch list, and its dependency read all ask it before the account running `cwcli ui`, so the Apps page shows the same repositories for every member; the GitLab hosts it checks are the account's own `glab` hosts plus every non-GitHub host in `allowed_hosts`, and a host only `allowed_hosts` names is listed once a credential answers for it. cwcli's own `gh`/`glab` calls always run from the filesystem root, never from the directory `cwcli ui` was started in, so a repository the service account cannot read no longer breaks them.
|
|
199
200
|
- The group-owned socket (`0660 root:cwcli`) closes the world-connectable `0666` socket that could otherwise leak the first user's token to a second user on the box. A uid outside the `cwcli` group cannot reach it.
|
|
200
201
|
|
|
201
202
|
Run `cwcli doctor` to verify the shared install (group present, tree modes, service account).
|
|
@@ -2147,9 +2148,12 @@ cwcli status [OPTIONS] [PROJECT_NAME]
|
|
|
2147
2148
|
| Option | Description |
|
|
2148
2149
|
|--------|-------------|
|
|
2149
2150
|
| `--bench` | Report ONE bench: its numeric index or label. Omit it to report every bench |
|
|
2151
|
+
| `-p`, `--path` | Report ONE bench by its directory (lower-level alternative to `--bench`) |
|
|
2150
2152
|
| `-v`, `--verbose` | Show the per-process detail and the web HTTP probe on stderr |
|
|
2151
2153
|
| `-w`, `--watch` | Live, continuously-refreshing per-process view (Ctrl-C to exit) |
|
|
2152
2154
|
| `--interval` | Seconds between `--watch` refreshes (default 2, floored at 1s) |
|
|
2155
|
+
| `--clear-maintenance` | Take every site found in maintenance mode out of it without asking (see below); exits 1 if it is refused, the maintenance state of a bench or a site could not be read (for example, the instance is stopped or a site config is not valid JSON), or a site still answers 503; not combined with `--watch` (exit 2) |
|
|
2156
|
+
| `--site` | With `--clear-maintenance`: take only this site out of maintenance mode by turning off its own flag; it never touches the bench-wide flags, and a site the bench holds in maintenance is reported and exits 1. Without `--clear-maintenance` it is a usage error (exit 2) |
|
|
2153
2157
|
|
|
2154
2158
|
**Aggregate values** (printed on stdout, one token, exit 0). Each bench carries its
|
|
2155
2159
|
own; the stdout token is the **instance** fold over them (see below):
|
|
@@ -2212,12 +2216,20 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
|
|
|
2212
2216
|
per-process supervisord `state` is unavailable (there is no supervisord to ask);
|
|
2213
2217
|
`up` comes straight from `ps`. `status` only reads - it never launches supervisord.
|
|
2214
2218
|
|
|
2215
|
-
**Maintenance mode is called out plainly.**
|
|
2216
|
-
A site stuck in maintenance mode answers HTTP 503 to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, a
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
`status`
|
|
2219
|
+
**Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
|
|
2220
|
+
A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
|
|
2221
|
+
`status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
|
|
2222
|
+
the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
|
|
2223
|
+
and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
|
|
2224
|
+
When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
|
|
2225
|
+
It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
|
|
2226
|
+
On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
|
|
2227
|
+
`--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
|
|
2228
|
+
Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
|
|
2229
|
+
A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
|
|
2230
|
+
It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
|
|
2231
|
+
`cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
|
|
2232
|
+
The web UI shows the same fault on the instance, bench and site pages and the Sites list, with a button that runs the same clear as a tracked job.
|
|
2221
2233
|
These reads are skipped in the `--watch` loop (which makes no web probe).
|
|
2222
2234
|
|
|
2223
2235
|
**Per-bench, per-process detail (stderr):** one sub-block per bench, headed by its
|
|
@@ -2303,7 +2315,7 @@ While the daemon runs it polls process health for every running instance; the we
|
|
|
2303
2315
|
That check is a bare TCP connect to the bench's web port, not an HTTP request, so polling writes nothing to the bench's web access log; the Bench page shows its verdict as `Listening` or `Not listening` next to the web port, or `unknown` while the latest health probe has failed and the page is showing the last successful probe's readings.
|
|
2304
2316
|
It refuses any request whose `Host` is not this machine, so another site in your browser cannot read or drive it.
|
|
2305
2317
|
|
|
2306
|
-
**What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take
|
|
2318
|
+
**What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take sites out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
|
|
2307
2319
|
These lifecycle changes run as jobs too, so their steps and outcome remain visible after navigation.
|
|
2308
2320
|
When an action needs a stopped instance running, the page offers to start it first: an action on a bench, site or app starts that bench (`cwcli start <project> --bench <n>`), so a multi-bench instance never asks which bench, and an instance-level action starts only the containers, never a bench.
|
|
2309
2321
|
Remove bench on a stopped instance starts only its containers, and stops them again if the removal does not complete.
|
|
@@ -2371,6 +2383,7 @@ The host transport is the exception: different hosts may use different transport
|
|
|
2371
2383
|
See `integrations` below for the terminal commands, the declaration a repository needs, and where the code is installed.
|
|
2372
2384
|
|
|
2373
2385
|
**Publishing a site at its own domain:** with Cloudflare DNS, Nginx Proxy Manager or both turned on, **New site** offers "Publish it at a public address".
|
|
2386
|
+
A site publishes with the integrations of the machine its instance is on: a remote host's instance (see `remote` below) uses that host's own Cloudflare DNS and Nginx Proxy Manager, set up from the hub's Settings > Integrations with that host picked, and the dialog says so.
|
|
2374
2387
|
With Cloudflare on, the site name becomes a name plus a zone the token can see, so a typo cannot land in another zone, and a read-only preflight checks each part before anything is created: the bench's published port, whether the name is free in the zone (or already cwcli's), and whether a proxy host cwcli can see already uses it; with Nginx Proxy Manager alone it shows what the name resolves to now.
|
|
2375
2388
|
A failing preflight row keeps **Create site** disabled, and the `new-site` job runs the same preflight first, so a name that cannot be published never leaves a site behind.
|
|
2376
2389
|
The site is created exactly as without publishing; as soon as it exists a second job, **Publish site** (the card follows it as "part 2 of 2"), writes the A record, makes the proxy host, requests the certificate, then checks that `https://<site>/api/method/ping` answers.
|
|
@@ -2498,10 +2511,17 @@ An action on a remote instance goes to that machine's own daemon through the hub
|
|
|
2498
2511
|
The link states: `connected` (live, actions allowed), `connecting`, `unreachable` (the host stopped answering: its instances keep their last-known state as `unknown` with a last-seen time, actions are disabled, and nothing is started, stopped or retried because a host went quiet), `cwcli not running there`, `no longer accepts this hub`, `host key changed`, `different cwcli version` (reads work, actions wait until both sides speak the same web UI protocol; the message names the side to update), `integration off` and `service account only` (on a shared install, a group member's own web UI on the shared home: remote hosts run from the service account's web UI, the only one that can read the hub key, so this one lists them and dials none; a member opted back to a private home with `CWCLI_HOME` runs a hub of its own).
|
|
2499
2512
|
A dropped packet never flashes a host to unknown: one immediate re-probe decides.
|
|
2500
2513
|
A remote instance's page has the same live process readings and web check as a local one: while a tab has it open, the hub holds that host's stream with the instance as its focus.
|
|
2501
|
-
Backups, schedules, the apps catalog
|
|
2514
|
+
Backups, schedules, the apps catalog and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
|
|
2502
2515
|
Drop site on a remote site asks that machine, as the dialog opens, whether the site is published there, and offers "Also unpublish it" (ticked when it is), so the unpublish runs on the machine that published it.
|
|
2503
2516
|
When that machine cannot be read, or the page does not know the site's bench yet, the box is offered unticked with a note that its publication state could not be read.
|
|
2504
2517
|
|
|
2518
|
+
**Each remote host's own edge, set up from the hub.** A remote runs its own Nginx Proxy Manager and Cloudflare setup, and the hub is where it is managed: Settings > Integrations has a machine picker (shown once a host is added), and with a remote picked the panel lists that host's OWN official integrations and sets them up through the hub's forward.
|
|
2519
|
+
Test connection, Detect (the remote's own container discovery) and Test and turn on all run on that host; the secrets typed are stored encrypted on that host and never on the hub, which relays only the setup form and the test result, and no second store exists on the hub.
|
|
2520
|
+
Changing a machine's integrations is an Admin's act there, so the remote must have granted the hub the Admin cap: with an Operator (or Viewer) grant the panel says that configuring that host's integrations needs the Admin cap and names the exact command its owner runs there, `cwcli remote allow --hub <hub name> --key "<hub public key>" --max-role admin` (which replaces the earlier grant), with a Check now button for when it has been run.
|
|
2521
|
+
A host whose link is not connected (unreachable, host key changed, cwcli not running there, a different cwcli version, no longer accepting the hub) is named with the same advice as the Remote hosts panel, never a silent empty list.
|
|
2522
|
+
Community integrations are installed on each machine by its own Admin; the picker never offers them for a remote.
|
|
2523
|
+
Publishing then follows the instance: on a remote instance, New site's "Publish it at a public address" uses that host's own Cloudflare DNS and Nginx Proxy Manager (its zones, address, access lists and preflight are read from that host, and the sentence under the box names it), the Sites list's Public address column and globe menu show and drive each remote site's publication from that host's own store (Publish, Retry what is missing, Check for drift and Unpublish run there), the site's page states whose integrations published it, and a publish job's page shows "Integration settings: <host>'s own".
|
|
2524
|
+
|
|
2505
2525
|
**Security.** The hub forwards only `/api/v1/` paths, never a remote's sign-in, stream or hosts routes, and relays every answer as DATA: JSON, a download as an attachment or an image under a sandboxing policy, each with `X-Content-Type-Options: nosniff`, never a cookie and never a page (a remote can never serve code into the hub's origin).
|
|
2506
2526
|
A remote that is itself a hub keeps its own remote hosts to itself: the stream it serves through its bridge carries its own instances and jobs, never its hosts.
|
|
2507
2527
|
The hub builds every `ssh` argument list itself, validates the host and user it was given and puts `--` before them.
|
|
@@ -155,6 +155,7 @@ The per-user SQLite cache is regenerable (`cwcli inspect`) and deliberately not
|
|
|
155
155
|
- **`cwcli` group membership is the trust boundary.** Anyone in the group can read every instance's cache, read the rm/rm-site backups (which contain full database dumps), edit the shared config, and - with `--cred-bridge` - ask the machine-wide bridge for a credential. This is the same "docker group ≈ root-ish capability" trade every shared dev tool makes. Keep membership deliberate.
|
|
156
156
|
- **The credential bridge in shared mode serves one machine-owned, read-only service-account token** to any group member's container git, so its audit log records the host and project but **not which human** triggered a fetch (they all present as the service account). Provision that account with a read-only deploy token; rotate it in one place if it leaks.
|
|
157
157
|
- **The shared credential is also the default for cwcli's own fetches.** `cwcli init --frappe-url <private fork>`, `apps install`, `apps update`, and `apps checkout` first wire the instance into the machine-wide bridge, so a member who never signed in to `gh`/`glab` personally can still fetch a private repo. A member's own `gh`/`glab` sign-in is only the automatic fallback, used when the shared credential answers nothing for that host (for example a host missing from `allowed_hosts`, or the bridge daemon is down), and cwcli prints one line on stderr when it falls back.
|
|
158
|
+
- **The web UI's app catalog reads the shared credential first, too.** The bridge daemon serves one machine-wide socket in the shared run directory (group-gated like the per-instance ones), and the catalog's forge scan, an app's branch list, and its dependency read all ask it before the account running `cwcli ui`, so the Apps page shows the same repositories for every member; the GitLab hosts it checks are the account's own `glab` hosts plus every non-GitHub host in `allowed_hosts`, and a host only `allowed_hosts` names is listed once a credential answers for it. cwcli's own `gh`/`glab` calls always run from the filesystem root, never from the directory `cwcli ui` was started in, so a repository the service account cannot read no longer breaks them.
|
|
158
159
|
- The group-owned socket (`0660 root:cwcli`) closes the world-connectable `0666` socket that could otherwise leak the first user's token to a second user on the box. A uid outside the `cwcli` group cannot reach it.
|
|
159
160
|
|
|
160
161
|
Run `cwcli doctor` to verify the shared install (group present, tree modes, service account).
|
|
@@ -2106,9 +2107,12 @@ cwcli status [OPTIONS] [PROJECT_NAME]
|
|
|
2106
2107
|
| Option | Description |
|
|
2107
2108
|
|--------|-------------|
|
|
2108
2109
|
| `--bench` | Report ONE bench: its numeric index or label. Omit it to report every bench |
|
|
2110
|
+
| `-p`, `--path` | Report ONE bench by its directory (lower-level alternative to `--bench`) |
|
|
2109
2111
|
| `-v`, `--verbose` | Show the per-process detail and the web HTTP probe on stderr |
|
|
2110
2112
|
| `-w`, `--watch` | Live, continuously-refreshing per-process view (Ctrl-C to exit) |
|
|
2111
2113
|
| `--interval` | Seconds between `--watch` refreshes (default 2, floored at 1s) |
|
|
2114
|
+
| `--clear-maintenance` | Take every site found in maintenance mode out of it without asking (see below); exits 1 if it is refused, the maintenance state of a bench or a site could not be read (for example, the instance is stopped or a site config is not valid JSON), or a site still answers 503; not combined with `--watch` (exit 2) |
|
|
2115
|
+
| `--site` | With `--clear-maintenance`: take only this site out of maintenance mode by turning off its own flag; it never touches the bench-wide flags, and a site the bench holds in maintenance is reported and exits 1. Without `--clear-maintenance` it is a usage error (exit 2) |
|
|
2112
2116
|
|
|
2113
2117
|
**Aggregate values** (printed on stdout, one token, exit 0). Each bench carries its
|
|
2114
2118
|
own; the stdout token is the **instance** fold over them (see below):
|
|
@@ -2171,12 +2175,20 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
|
|
|
2171
2175
|
per-process supervisord `state` is unavailable (there is no supervisord to ask);
|
|
2172
2176
|
`up` comes straight from `ps`. `status` only reads - it never launches supervisord.
|
|
2173
2177
|
|
|
2174
|
-
**Maintenance mode is called out plainly.**
|
|
2175
|
-
A site stuck in maintenance mode answers HTTP 503 to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, a
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
`status`
|
|
2178
|
+
**Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
|
|
2179
|
+
A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
|
|
2180
|
+
`status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
|
|
2181
|
+
the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
|
|
2182
|
+
and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
|
|
2183
|
+
When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
|
|
2184
|
+
It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
|
|
2185
|
+
On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
|
|
2186
|
+
`--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
|
|
2187
|
+
Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
|
|
2188
|
+
A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
|
|
2189
|
+
It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
|
|
2190
|
+
`cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
|
|
2191
|
+
The web UI shows the same fault on the instance, bench and site pages and the Sites list, with a button that runs the same clear as a tracked job.
|
|
2180
2192
|
These reads are skipped in the `--watch` loop (which makes no web probe).
|
|
2181
2193
|
|
|
2182
2194
|
**Per-bench, per-process detail (stderr):** one sub-block per bench, headed by its
|
|
@@ -2262,7 +2274,7 @@ While the daemon runs it polls process health for every running instance; the we
|
|
|
2262
2274
|
That check is a bare TCP connect to the bench's web port, not an HTTP request, so polling writes nothing to the bench's web access log; the Bench page shows its verdict as `Listening` or `Not listening` next to the web port, or `unknown` while the latest health probe has failed and the page is showing the last successful probe's readings.
|
|
2263
2275
|
It refuses any request whose `Host` is not this machine, so another site in your browser cannot read or drive it.
|
|
2264
2276
|
|
|
2265
|
-
**What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take
|
|
2277
|
+
**What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take sites out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
|
|
2266
2278
|
These lifecycle changes run as jobs too, so their steps and outcome remain visible after navigation.
|
|
2267
2279
|
When an action needs a stopped instance running, the page offers to start it first: an action on a bench, site or app starts that bench (`cwcli start <project> --bench <n>`), so a multi-bench instance never asks which bench, and an instance-level action starts only the containers, never a bench.
|
|
2268
2280
|
Remove bench on a stopped instance starts only its containers, and stops them again if the removal does not complete.
|
|
@@ -2330,6 +2342,7 @@ The host transport is the exception: different hosts may use different transport
|
|
|
2330
2342
|
See `integrations` below for the terminal commands, the declaration a repository needs, and where the code is installed.
|
|
2331
2343
|
|
|
2332
2344
|
**Publishing a site at its own domain:** with Cloudflare DNS, Nginx Proxy Manager or both turned on, **New site** offers "Publish it at a public address".
|
|
2345
|
+
A site publishes with the integrations of the machine its instance is on: a remote host's instance (see `remote` below) uses that host's own Cloudflare DNS and Nginx Proxy Manager, set up from the hub's Settings > Integrations with that host picked, and the dialog says so.
|
|
2333
2346
|
With Cloudflare on, the site name becomes a name plus a zone the token can see, so a typo cannot land in another zone, and a read-only preflight checks each part before anything is created: the bench's published port, whether the name is free in the zone (or already cwcli's), and whether a proxy host cwcli can see already uses it; with Nginx Proxy Manager alone it shows what the name resolves to now.
|
|
2334
2347
|
A failing preflight row keeps **Create site** disabled, and the `new-site` job runs the same preflight first, so a name that cannot be published never leaves a site behind.
|
|
2335
2348
|
The site is created exactly as without publishing; as soon as it exists a second job, **Publish site** (the card follows it as "part 2 of 2"), writes the A record, makes the proxy host, requests the certificate, then checks that `https://<site>/api/method/ping` answers.
|
|
@@ -2457,10 +2470,17 @@ An action on a remote instance goes to that machine's own daemon through the hub
|
|
|
2457
2470
|
The link states: `connected` (live, actions allowed), `connecting`, `unreachable` (the host stopped answering: its instances keep their last-known state as `unknown` with a last-seen time, actions are disabled, and nothing is started, stopped or retried because a host went quiet), `cwcli not running there`, `no longer accepts this hub`, `host key changed`, `different cwcli version` (reads work, actions wait until both sides speak the same web UI protocol; the message names the side to update), `integration off` and `service account only` (on a shared install, a group member's own web UI on the shared home: remote hosts run from the service account's web UI, the only one that can read the hub key, so this one lists them and dials none; a member opted back to a private home with `CWCLI_HOME` runs a hub of its own).
|
|
2458
2471
|
A dropped packet never flashes a host to unknown: one immediate re-probe decides.
|
|
2459
2472
|
A remote instance's page has the same live process readings and web check as a local one: while a tab has it open, the hub holds that host's stream with the instance as its focus.
|
|
2460
|
-
Backups, schedules, the apps catalog
|
|
2473
|
+
Backups, schedules, the apps catalog and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
|
|
2461
2474
|
Drop site on a remote site asks that machine, as the dialog opens, whether the site is published there, and offers "Also unpublish it" (ticked when it is), so the unpublish runs on the machine that published it.
|
|
2462
2475
|
When that machine cannot be read, or the page does not know the site's bench yet, the box is offered unticked with a note that its publication state could not be read.
|
|
2463
2476
|
|
|
2477
|
+
**Each remote host's own edge, set up from the hub.** A remote runs its own Nginx Proxy Manager and Cloudflare setup, and the hub is where it is managed: Settings > Integrations has a machine picker (shown once a host is added), and with a remote picked the panel lists that host's OWN official integrations and sets them up through the hub's forward.
|
|
2478
|
+
Test connection, Detect (the remote's own container discovery) and Test and turn on all run on that host; the secrets typed are stored encrypted on that host and never on the hub, which relays only the setup form and the test result, and no second store exists on the hub.
|
|
2479
|
+
Changing a machine's integrations is an Admin's act there, so the remote must have granted the hub the Admin cap: with an Operator (or Viewer) grant the panel says that configuring that host's integrations needs the Admin cap and names the exact command its owner runs there, `cwcli remote allow --hub <hub name> --key "<hub public key>" --max-role admin` (which replaces the earlier grant), with a Check now button for when it has been run.
|
|
2480
|
+
A host whose link is not connected (unreachable, host key changed, cwcli not running there, a different cwcli version, no longer accepting the hub) is named with the same advice as the Remote hosts panel, never a silent empty list.
|
|
2481
|
+
Community integrations are installed on each machine by its own Admin; the picker never offers them for a remote.
|
|
2482
|
+
Publishing then follows the instance: on a remote instance, New site's "Publish it at a public address" uses that host's own Cloudflare DNS and Nginx Proxy Manager (its zones, address, access lists and preflight are read from that host, and the sentence under the box names it), the Sites list's Public address column and globe menu show and drive each remote site's publication from that host's own store (Publish, Retry what is missing, Check for drift and Unpublish run there), the site's page states whose integrations published it, and a publish job's page shows "Integration settings: <host>'s own".
|
|
2483
|
+
|
|
2464
2484
|
**Security.** The hub forwards only `/api/v1/` paths, never a remote's sign-in, stream or hosts routes, and relays every answer as DATA: JSON, a download as an attachment or an image under a sandboxing policy, each with `X-Content-Type-Options: nosniff`, never a cookie and never a page (a remote can never serve code into the hub's origin).
|
|
2465
2485
|
A remote that is itself a hub keeps its own remote hosts to itself: the stream it serves through its bridge carries its own instances and jobs, never its hosts.
|
|
2466
2486
|
The hub builds every `ssh` argument list itself, validates the host and user it was given and puts `--` before them.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.7.0"
|
|
@@ -2024,7 +2024,10 @@ class _Handler(BaseHTTPRequestHandler):
|
|
|
2024
2024
|
"step_failed",
|
|
2025
2025
|
"maintenance.still_on",
|
|
2026
2026
|
f"bench refused to take '{site}' out of maintenance mode.",
|
|
2027
|
-
hint=
|
|
2027
|
+
hint="Try: "
|
|
2028
|
+
+ core_bench_ops.clear_maintenance_command(
|
|
2029
|
+
project, core_resolvers.bench_cli_flag(project, bench_path), site
|
|
2030
|
+
),
|
|
2028
2031
|
outcome=_plain(outcome),
|
|
2029
2032
|
warnings=[_plain(w) for w in warnings],
|
|
2030
2033
|
),
|
|
@@ -10,9 +10,15 @@ gets one word while a human at a terminal still sees the full breakdown. Exit 0
|
|
|
10
10
|
across the lifecycle states (including a real-but-stopped ``offline`` project); a
|
|
11
11
|
truly-nonexistent project name exits non-zero with a "no such project" error.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
The bare form on a multi-bench project reports every bench, each headed by its
|
|
14
|
+
index, path, label, and own aggregate, with the web line naming the port that was
|
|
15
|
+
actually probed - it never asks which bench.
|
|
16
|
+
|
|
17
|
+
The ONE question it asks: when a bench has sites in maintenance mode and nothing that
|
|
18
|
+
sets maintenance mode is still running there, an interactive terminal (stdin, stdout
|
|
19
|
+
and stderr all TTYs) is asked whether to take them out (``core.maintenance.clear``).
|
|
20
|
+
A non-TTY is never asked; the warning names ``--clear-maintenance``, which does it
|
|
21
|
+
without asking.
|
|
16
22
|
|
|
17
23
|
``--watch`` adds a live, continuously-refreshing per-process view (rich ``Live``
|
|
18
24
|
on stderr). Crucially it re-polls with ``probe_web=False`` so repeated ticks make
|
|
@@ -28,11 +34,13 @@ import sys
|
|
|
28
34
|
import time
|
|
29
35
|
from collections.abc import Sequence
|
|
30
36
|
|
|
37
|
+
import questionary
|
|
31
38
|
import typer
|
|
32
39
|
from rich.live import Live
|
|
33
40
|
from rich.table import Table
|
|
34
41
|
|
|
35
42
|
from ..core import docker as core_docker
|
|
43
|
+
from ..core import maintenance as core_maintenance
|
|
36
44
|
from ..core import resolvers
|
|
37
45
|
from ..core import status as core_status
|
|
38
46
|
from ..core.envelope import Message, Result
|
|
@@ -58,6 +66,9 @@ def status(
|
|
|
58
66
|
"--bench",
|
|
59
67
|
help="Which bench to report: its numeric index or label (multi-bench projects).",
|
|
60
68
|
),
|
|
69
|
+
path: str = typer.Option(
|
|
70
|
+
None, "--path", "-p", help="Explicit bench directory (lower-level alternative to --bench)."
|
|
71
|
+
),
|
|
61
72
|
verbose: bool = typer.Option(
|
|
62
73
|
False,
|
|
63
74
|
"--verbose",
|
|
@@ -76,6 +87,21 @@ def status(
|
|
|
76
87
|
"--interval",
|
|
77
88
|
help="Seconds between --watch refreshes (floored at 1s).",
|
|
78
89
|
),
|
|
90
|
+
clear_maintenance: bool = typer.Option(
|
|
91
|
+
False,
|
|
92
|
+
"--clear-maintenance",
|
|
93
|
+
help="Take every site found in maintenance mode out of it without asking: clears "
|
|
94
|
+
"the bench-wide flag (and resumes a scheduler paused with it) or the site's own "
|
|
95
|
+
"flag, then checks the sites answer again. Refused while a migrate, update or "
|
|
96
|
+
"restore still runs on the bench. Not combined with --watch.",
|
|
97
|
+
),
|
|
98
|
+
site: str = typer.Option(
|
|
99
|
+
None,
|
|
100
|
+
"--site",
|
|
101
|
+
help="With --clear-maintenance: take only this site out of maintenance mode, by "
|
|
102
|
+
"turning off its own flag. It never touches the bench-wide flags; a site the bench "
|
|
103
|
+
"holds in maintenance is reported, not cleared.",
|
|
104
|
+
),
|
|
79
105
|
):
|
|
80
106
|
"""
|
|
81
107
|
Check the health status of a Frappe project instance.
|
|
@@ -92,19 +118,34 @@ def status(
|
|
|
92
118
|
With no project name, this prints the all-instances summary (the same table
|
|
93
119
|
`cwcli ls` gives) instead of erring - a bare `status` reads like "how is
|
|
94
120
|
everything", not a missing-argument mistake.
|
|
121
|
+
|
|
122
|
+
When sites are in maintenance mode (HTTP 503), an interactive terminal is asked
|
|
123
|
+
whether to take them out; ``--clear-maintenance`` does it without asking, and
|
|
124
|
+
exits 1 if any site still answers maintenance mode or its state could not be read.
|
|
95
125
|
"""
|
|
96
126
|
if project_name is None:
|
|
97
127
|
render_instances_summary(verbose=verbose)
|
|
98
128
|
raise typer.Exit(code=0)
|
|
99
129
|
|
|
130
|
+
if site and not clear_maintenance:
|
|
131
|
+
stderr_console.print("[bold red]Error:[/bold red] --site needs --clear-maintenance.")
|
|
132
|
+
raise typer.Exit(code=2)
|
|
133
|
+
|
|
134
|
+
if watch and clear_maintenance:
|
|
135
|
+
stderr_console.print(
|
|
136
|
+
"[bold red]Error:[/bold red] --clear-maintenance does not combine with --watch; "
|
|
137
|
+
"run it without --watch."
|
|
138
|
+
)
|
|
139
|
+
raise typer.Exit(code=2)
|
|
140
|
+
|
|
100
141
|
if watch and sys.stdout.isatty() and sys.stderr.isatty():
|
|
101
142
|
# Live view: quiet (probe_web=False) so repeated ticks never hit :8000.
|
|
102
|
-
_watch_loop(project_name, bench, verbose, max(_MIN_INTERVAL, interval))
|
|
143
|
+
_watch_loop(project_name, bench, path, verbose, max(_MIN_INTERVAL, interval))
|
|
103
144
|
raise typer.Exit(code=0)
|
|
104
145
|
|
|
105
146
|
# One-shot. The plain command keeps its web probe; a non-TTY --watch degrades
|
|
106
147
|
# to a single quiet snapshot (probe_web=False) to preserve watch semantics.
|
|
107
|
-
result = _fetch(project_name, bench, probe_web=not watch)
|
|
148
|
+
result = _fetch(project_name, bench, path, probe_web=not watch)
|
|
108
149
|
report = result.data
|
|
109
150
|
assert report is not None # OK/WARNING always carries a StatusReport
|
|
110
151
|
if verbose:
|
|
@@ -116,15 +157,147 @@ def status(
|
|
|
116
157
|
continue
|
|
117
158
|
stderr_console.print(f"[dim]{warning.text}[/dim]")
|
|
118
159
|
_render_detail(report, verbose, result.warnings)
|
|
160
|
+
code = (
|
|
161
|
+
_clear_bench(project_name, bench=bench, path=path, site=site)
|
|
162
|
+
if site
|
|
163
|
+
else _offer_clear_maintenance(project_name, report, assume_yes=clear_maintenance)
|
|
164
|
+
)
|
|
119
165
|
|
|
120
166
|
# The one machine-readable token on stdout (nothing else).
|
|
121
167
|
typer.echo(report.overall)
|
|
122
|
-
raise typer.Exit(code=
|
|
168
|
+
raise typer.Exit(code=code)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _interactive() -> bool:
|
|
172
|
+
"""Only a person at a terminal is asked: stdin, stdout and stderr all TTYs, so a
|
|
173
|
+
script capturing the stdout token is never blocked on a question."""
|
|
174
|
+
return sys.stdin.isatty() and sys.stdout.isatty() and sys.stderr.isatty()
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def _offer_clear_maintenance(project_name: str, report: StatusReport, *, assume_yes: bool) -> int:
|
|
178
|
+
"""Ask (or, with ``--clear-maintenance``, just do) the clear for each stuck bench.
|
|
179
|
+
|
|
180
|
+
Returns the exit code: 1 when ``--clear-maintenance`` was refused (something that
|
|
181
|
+
sets maintenance mode still runs, or a bench's or site's maintenance state could not be
|
|
182
|
+
read) or a clear left a site down, else 0. A declined question is not a failure.
|
|
183
|
+
"""
|
|
184
|
+
stuck = [b for b in report.benches if b.maintenance and b.maintenance.needs_clearing]
|
|
185
|
+
unread = [
|
|
186
|
+
b.bench_path
|
|
187
|
+
for b in report.benches
|
|
188
|
+
if b.maintenance is None and b.bench_present != resolvers.BENCH_ABSENT
|
|
189
|
+
] + [s for b in report.benches if b.maintenance for s in b.maintenance.unknown]
|
|
190
|
+
code = 0
|
|
191
|
+
if assume_yes and (unread or not report.container_running):
|
|
192
|
+
where = ", ".join(unread) or project_name
|
|
193
|
+
reason = "" if report.container_running else " because the container is not running"
|
|
194
|
+
stderr_console.print(
|
|
195
|
+
f"[bold red]Not cleared:[/bold red] cwcli could not read maintenance mode on "
|
|
196
|
+
f"{where}{reason}."
|
|
197
|
+
)
|
|
198
|
+
code = 1
|
|
199
|
+
if not stuck:
|
|
200
|
+
if assume_yes and code == 0:
|
|
201
|
+
stderr_console.print("[dim]No site is in maintenance mode.[/dim]")
|
|
202
|
+
return code
|
|
203
|
+
for bench in stuck:
|
|
204
|
+
found = bench.maintenance
|
|
205
|
+
assert found is not None
|
|
206
|
+
if found.busy:
|
|
207
|
+
if assume_yes:
|
|
208
|
+
stderr_console.print(
|
|
209
|
+
"[bold red]Not cleared:[/bold red] " + "; ".join(found.busy) + "."
|
|
210
|
+
)
|
|
211
|
+
code = 1
|
|
212
|
+
continue
|
|
213
|
+
if not assume_yes:
|
|
214
|
+
if not _interactive():
|
|
215
|
+
continue # the warning above names --clear-maintenance
|
|
216
|
+
leftover = bool(found.owners) and all(o.running is False for o in found.owners)
|
|
217
|
+
try:
|
|
218
|
+
answer = questionary.confirm(
|
|
219
|
+
core_maintenance.prompt_text(found), default=leftover, auto_enter=False
|
|
220
|
+
).ask()
|
|
221
|
+
except (KeyboardInterrupt, EOFError):
|
|
222
|
+
answer = None
|
|
223
|
+
if not answer:
|
|
224
|
+
stderr_console.print(
|
|
225
|
+
f"[dim]Left as it is. To clear it later: {found.command}[/dim]"
|
|
226
|
+
)
|
|
227
|
+
continue
|
|
228
|
+
code = max(code, _clear_bench(project_name, path=bench.bench_path))
|
|
229
|
+
return code
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _clear_bench(
|
|
233
|
+
project_name: str,
|
|
234
|
+
*,
|
|
235
|
+
bench: str | None = None,
|
|
236
|
+
path: str | None = None,
|
|
237
|
+
site: str | None = None,
|
|
238
|
+
) -> int:
|
|
239
|
+
"""Run the clear for one bench (or its one ``site``), narrating its steps on
|
|
240
|
+
stderr. 0 when every site answers again, else 1."""
|
|
241
|
+
|
|
242
|
+
def narrate(event) -> None:
|
|
243
|
+
if isinstance(event, core_maintenance.MaintenanceStepEnd):
|
|
244
|
+
mark = {"ok": "[green]✓[/green]", "warning": "[yellow]![/yellow]"}.get(
|
|
245
|
+
event.status, "[bold red]✗[/bold red]"
|
|
246
|
+
)
|
|
247
|
+
grid = Table.grid(padding=(0, 1))
|
|
248
|
+
grid.add_row(f" {mark}", event.message)
|
|
249
|
+
stderr_console.print(grid)
|
|
250
|
+
elif event.phase == "verify":
|
|
251
|
+
stderr_console.print(
|
|
252
|
+
" [dim]Waiting for every site to answer (Frappe can answer from its "
|
|
253
|
+
"config cache for up to a minute)...[/dim]"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
try:
|
|
257
|
+
result = core_maintenance.clear(
|
|
258
|
+
project_name, bench=bench, path=path, site=site, consent=True, on_event=narrate
|
|
259
|
+
)
|
|
260
|
+
except CwcliError as e:
|
|
261
|
+
stderr_console.print(f"[bold red]Not cleared:[/bold red] {e.message}")
|
|
262
|
+
return 1
|
|
263
|
+
outcome = result.data
|
|
264
|
+
for warning in result.warnings:
|
|
265
|
+
stderr_console.print(f"[yellow]{warning.text}[/yellow]")
|
|
266
|
+
if outcome is None:
|
|
267
|
+
if result.choice is not None:
|
|
268
|
+
stderr_console.print(
|
|
269
|
+
f"[bold red]Not cleared:[/bold red] {result.choice.prompt} "
|
|
270
|
+
"(pass --bench to name the bench, or start the instance first)"
|
|
271
|
+
)
|
|
272
|
+
return 1
|
|
273
|
+
if outcome.ok:
|
|
274
|
+
unchecked = [s for s in outcome.sites if s not in outcome.answering]
|
|
275
|
+
if outcome.answering:
|
|
276
|
+
stderr_console.print(
|
|
277
|
+
f"[green]Out of maintenance mode:[/green] {', '.join(outcome.answering)}"
|
|
278
|
+
)
|
|
279
|
+
if unchecked:
|
|
280
|
+
stderr_console.print(
|
|
281
|
+
f"[yellow]Flags cleared, not checked:[/yellow] {', '.join(unchecked)}"
|
|
282
|
+
)
|
|
283
|
+
return 0
|
|
284
|
+
if outcome.still_down:
|
|
285
|
+
stderr_console.print(
|
|
286
|
+
"[bold red]Still in maintenance mode:[/bold red] " + ", ".join(outcome.still_down)
|
|
287
|
+
)
|
|
288
|
+
elif any(w.code == "maintenance.unknown" for w in result.warnings):
|
|
289
|
+
stderr_console.print(
|
|
290
|
+
"[bold red]Not cleared:[/bold red] cwcli could not read maintenance mode there."
|
|
291
|
+
)
|
|
292
|
+
else:
|
|
293
|
+
stderr_console.print("[bold red]Not cleared:[/bold red] a write was refused.")
|
|
294
|
+
return 1
|
|
123
295
|
|
|
124
296
|
|
|
125
297
|
def _fetch(
|
|
126
298
|
project_name: str,
|
|
127
299
|
bench: str | None,
|
|
300
|
+
path: str | None = None,
|
|
128
301
|
*,
|
|
129
302
|
probe_web: bool,
|
|
130
303
|
) -> Result[StatusReport]:
|
|
@@ -137,7 +310,12 @@ def _fetch(
|
|
|
137
310
|
it already was, and a non-TTY no longer has a path that could hang or refuse.
|
|
138
311
|
"""
|
|
139
312
|
try:
|
|
140
|
-
return core_status.status(
|
|
313
|
+
return core_status.status(
|
|
314
|
+
project_name,
|
|
315
|
+
bench=bench,
|
|
316
|
+
bench_path=path,
|
|
317
|
+
probe_web=probe_web,
|
|
318
|
+
)
|
|
141
319
|
except CwcliError as e:
|
|
142
320
|
# A truly-nonexistent project (NOT_FOUND) or an unreachable Docker daemon
|
|
143
321
|
# (DOCKER) reaches here; a real-but-stopped project is a returned
|
|
@@ -147,7 +325,9 @@ def _fetch(
|
|
|
147
325
|
raise typer.Exit(code=1) from None
|
|
148
326
|
|
|
149
327
|
|
|
150
|
-
def _watch_loop(
|
|
328
|
+
def _watch_loop(
|
|
329
|
+
project_name: str, bench: str | None, path: str | None, verbose: bool, interval: float
|
|
330
|
+
) -> None:
|
|
151
331
|
"""Live per-process view on stderr, re-polling with the web probe suppressed.
|
|
152
332
|
|
|
153
333
|
Every tick re-polls with ``probe_web=False``, so the watch loop makes zero HTTP
|
|
@@ -155,19 +335,21 @@ def _watch_loop(project_name: str, bench: str | None, verbose: bool, interval: f
|
|
|
155
335
|
context exit); exit 0, nothing on stdout.
|
|
156
336
|
"""
|
|
157
337
|
try:
|
|
158
|
-
report = _snapshot(project_name, bench, probe_web=False)
|
|
338
|
+
report = _snapshot(project_name, bench, path, probe_web=False)
|
|
159
339
|
with Live(_render_table(report), console=stderr_console, refresh_per_second=4) as live:
|
|
160
340
|
while True:
|
|
161
341
|
time.sleep(interval)
|
|
162
|
-
report = _snapshot(project_name, bench, probe_web=False)
|
|
342
|
+
report = _snapshot(project_name, bench, path, probe_web=False)
|
|
163
343
|
live.update(_render_table(report))
|
|
164
344
|
except KeyboardInterrupt:
|
|
165
345
|
pass
|
|
166
346
|
|
|
167
347
|
|
|
168
|
-
def _snapshot(
|
|
348
|
+
def _snapshot(
|
|
349
|
+
project_name: str, bench: str | None, path: str | None, *, probe_web: bool
|
|
350
|
+
) -> StatusReport:
|
|
169
351
|
"""A quiet (``probe_web=False``) watch snapshot."""
|
|
170
|
-
result = _fetch(project_name, bench, probe_web=probe_web)
|
|
352
|
+
result = _fetch(project_name, bench, path, probe_web=probe_web)
|
|
171
353
|
assert result.data is not None
|
|
172
354
|
return result.data
|
|
173
355
|
|
|
@@ -25,6 +25,8 @@ from rich.padding import Padding
|
|
|
25
25
|
from rich.status import Status as RichStatus
|
|
26
26
|
from rich.table import Table
|
|
27
27
|
|
|
28
|
+
from ..core import bench_ops as core_bench_ops
|
|
29
|
+
from ..core import resolvers as core_resolvers
|
|
28
30
|
from ..core import update as core_update
|
|
29
31
|
from ..core import update as core_update_mod
|
|
30
32
|
from ..core import update_preflight
|
|
@@ -651,12 +653,10 @@ def _report_summary(report: UpdateReport, pull_tails: dict[str, str] | None = No
|
|
|
651
653
|
f"[bold red]✗ Could not disable maintenance mode for "
|
|
652
654
|
f"{len(report.failed_maintenance_disable)} site(s):[/bold red]"
|
|
653
655
|
)
|
|
656
|
+
bench_flag = core_resolvers.bench_cli_flag(report.project, report.bench_path)
|
|
654
657
|
for site in report.failed_maintenance_disable:
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
f"'cwcli run {shlex.quote(report.project)} --site {shlex.quote(site)} "
|
|
658
|
-
f"set-maintenance-mode off'"
|
|
659
|
-
)
|
|
658
|
+
command = core_bench_ops.clear_maintenance_command(report.project, bench_flag, site)
|
|
659
|
+
console.print(f" • {site}: still in maintenance mode - run: {command}")
|
|
660
660
|
|
|
661
661
|
|
|
662
662
|
def _report_bench_state(report: UpdateReport) -> None:
|