v0.7.10: events tab rework, quieter logs, known hosts, dropdown theme fixes

This commit is contained in:
Reditus committed 2026-09-26 11:54:08 +01:00
1 parent 97cdbd3027
commit 91c7abc771
24 files changed
+740 -103

No files matched your search

+4 -2
View File
@@ -99,12 +99,14 @@ class ChatService:
return 0
if not namespace:
logger.warning("Cannot catch up - kubernetes namespace not set")
# The API response already reports the failure to the UI.
logger.debug("Cannot catch up - kubernetes namespace not set")
return 0
pod_name = self.k8s.get_text_router_pod()
if not pod_name:
logger.warning("Cannot catch up - no text-router pod found")
# The API response already reports the failure to the UI.
logger.debug("Cannot catch up - no text-router pod found")
return 0
logger.debug(f"Attempting to catch up chat from pod: {pod_name}")
+2 -1
View File
@@ -235,7 +235,8 @@ class PlayerService:
FROM dune.actors WHERE id = %s
""", [state_pawn_id], one=True) or {}
except Exception as e:
logger.warning(f"Failed to get vitals: {e}")
# Missing pawn data is routine (page renders N/A instead).
logger.debug(f"Failed to get vitals: {e}")
return {}
def get_player_guild(self, player_controller_id):
+28
View File
@@ -1,6 +1,7 @@
"""SSH service - remote command execution via paramiko."""
import logging
import os
import threading
import paramiko
@@ -12,6 +13,20 @@ KEEPALIVE_INTERVAL = 15
logger = logging.getLogger(__name__)
def known_hosts_path():
"""Location of the persisted known-hosts file.
Overridable via DUNE_KNOWN_HOSTS (used by tests). Host keys are saved
after the first successful connect, so later connects verify the host
instead of warning about unknown keys every time.
"""
override = os.environ.get('DUNE_KNOWN_HOSTS')
if override:
return override
base_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
return os.path.join(base_dir, 'internal-scripts', 'ssh', 'known_hosts')
class SSHService:
"""SSH service using paramiko for connection reuse.
@@ -47,6 +62,13 @@ class SSHService:
self._client = None
client = paramiko.SSHClient()
hosts_file = known_hosts_path()
try:
if os.path.exists(hosts_file):
client.load_host_keys(hosts_file)
except Exception as e:
logger.debug(f"Could not load known hosts: {e}")
hosts_file = None
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
logger.debug("SSH host key verification policy set to AutoAddPolicy")
@@ -63,6 +85,12 @@ class SSHService:
try:
client.connect(**connect_kwargs)
logger.debug("SSH connection established to %s@%s", self.user, self.host)
if hosts_file:
try:
os.makedirs(os.path.dirname(hosts_file), exist_ok=True)
client.save_host_keys(hosts_file)
except Exception as e:
logger.debug(f"Could not save known hosts: {e}")
transport = client.get_transport()
if transport:
transport.set_keepalive(KEEPALIVE_INTERVAL)