Workers screen shows each agent's version and protocol, and who is behind
The hello carries the fluksio-worker version. An agent refused for an older protocol stays listed as Needs upgrade until it attaches again. Docs gain an Upgrading workers section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -28,6 +28,7 @@ import argparse
|
||||
import asyncio
|
||||
import contextlib
|
||||
import glob
|
||||
import importlib.metadata
|
||||
import ipaddress
|
||||
import json
|
||||
import logging
|
||||
@@ -167,6 +168,7 @@ class Agent:
|
||||
{
|
||||
"op": "hello",
|
||||
"protocol": PROTOCOL,
|
||||
"version": _version(),
|
||||
"name": self.args.name,
|
||||
"labels": self.args.labels,
|
||||
"python": self.args.python,
|
||||
@@ -421,6 +423,14 @@ def _remap_cuda(mask: str, requested: str) -> str:
|
||||
return ",".join(out)
|
||||
|
||||
|
||||
def _version() -> str:
|
||||
"""The installed fluksio-worker, or empty when this file was copied over."""
|
||||
try:
|
||||
return importlib.metadata.version("fluksio-worker")
|
||||
except importlib.metadata.PackageNotFoundError:
|
||||
return ""
|
||||
|
||||
|
||||
def _venv_digest(python: str) -> str:
|
||||
"""What is installed here, so the engine can say when it has drifted."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user