AI Agent details are not updated automatically
Describe the bug AI Agent (Docker) details are not updated automatically in UI on agent version update:
- Docker Host dashboard shows old version of AI agent and proposes to update, even if it has been already updated and restarted.
- 'AI Agent' section of Docker Host dashboard is also not updated, shows old version and warning message: "Another agent tried to register for this Docker host at <date, time> while this one was online. If two agents use the same DOCKER_HOST_NAME, remove one or give each Docker host its own."
To Reproduce Steps to reproduce the behavior:
- Go to 'Infrastructure - Docker' dashboard
- Click on a host item (for ex.: test01)
- Scroll down to 'AI Agent'. It shows that new version available.
- Proceed with AI Agent update on host 'test01': pull new docker image, remove existing container (rm -f), start new version, same command, as previous version had been started (same DOCKER_HOST_NAME on the same host).
- Details, that AI agent is updated (has latest version), does not appear in UI, still shows proposal for update and previous version number installed.
- Click on 'Open the AI agent page', message "Another agent tried to register for this Docker host at <date, time> while this one was online. If two agents use the same DOCKER_HOST_NAME, remove one or give each Docker host its own." appears, and it shows previous version number (even we already updated the agent).
- Click '...' -> Test Connection. It tooks longer, that usual, but updates details in dashboard correctly.
Expected behavior After docker ai agent is updated to newer version, dashboard should automatically update details about the version, without manual intervention. Also, the message about 'two agents use the same DOCKER_HOST_NAME' should not appear if it's the same host, but AI agent was restarted, re-installed or updated.
Desktop:
- OS: MacOS
- Browser: Chrome
- Version: 155.0.8059.85
Deployment Type self hosted, docker run, VM Ubuntu 24.04 Version: 14.0.89 Commit: 7df7e324ef95e408b42f7f77490b6dbcf62da753
Hi! I'd like to investigate this issue. From the reproduction steps, it seems the Docker Host dashboard may not refresh its AI Agent details after the agent reconnects following an update.
I'd like to trace the registration and dashboard refresh flow, reproduce the stale-state behavior, and add a regression test before proposing a fix. Is anyone already working on this, and would you be open to a community PR?