Skip to content

web/api: show agent versions on device detail page#534

Draft
nikw9944 wants to merge 2 commits into
mainfrom
controller-agent-versions
Draft

web/api: show agent versions on device detail page#534
nikw9944 wants to merge 2 commits into
mainfrom
controller-agent-versions

Conversation

@nikw9944

@nikw9944 nikw9944 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Register controller_agent_versions as external remote table proxies for mainnet-beta, devnet, and testnet environments
  • Display telemetry agent, config agent, and controller versions on the device detail page (/dz/devices/<pk>), querying fact_dz_device_link_latency_sample_header for telemetry and the new controller_agent_versions proxy table for config agent/controller versions
  • Companion to controller: write config agent version info to ClickHouse doublezero#3578 which adds the controller_agent_versions ReplacingMergeTree table to the controller

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 3 +69 / -0 +69
Scaffolding 1 +3 / -0 +3
Total 4 +72 / -0 +72

Small feature — API queries + frontend display with scaffolding for remote table registration.

Key files (click to expand)

ClickHouse Grants

The Lake remote user needs SELECT on the new table in each environment (one-time manual grant):

GRANT SELECT ON "mainnet-beta".controller_agent_versions TO <lake_remote_user>;
GRANT SELECT ON devnet.controller_agent_versions TO <lake_remote_user>;
GRANT SELECT ON testnet.controller_agent_versions TO <lake_remote_user>;

Testing Verification

  • All existing device handler tests pass (16/16), including TestGetDevice_ReturnsDetails, TestGetDevice_IncludesContributorInfo, TestGetDevice_IncludesTrafficRates
  • Version queries are non-fatal — if the proxy table doesn't exist yet or the device has no version data, the fields are simply omitted from the response

Register controller_agent_versions as external remote table
proxies for mainnet-beta, devnet, and testnet. This allows Lake
to query agent and controller version info written by the
controller service.
Display telemetry agent, config agent, and controller versions
on the device detail page. Telemetry agent version comes from
fact_dz_device_link_latency_sample_header; config agent and
controller versions come from the controller_agent_versions
proxy table.
@nikw9944 nikw9944 changed the title admin: add controller_agent_versions remote proxy tables web/api: show agent versions on device detail page Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant