fix(dgw): change AgentInfo.last_seen from epoch-ms integer to RFC 3339 date-time - #1968
Merged
Benoît Cortier (CBenoit) merged 2 commits intoSep 2, 2026
Conversation
…ad of epoch-ms Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update AgentInfo to expose last heartbeat as RFC 3339 timestamp
Change AgentInfo.last_seen from epoch-ms integer to RFC 3339 date-time
Sep 2, 2026
Benoît Cortier (CBenoit)
marked this pull request as ready for review
September 2, 2026 19:23
Benoît Cortier (CBenoit)
enabled auto-merge (squash)
September 2, 2026 19:23
Copilot started reviewing on behalf of
Benoît Cortier (CBenoit)
September 2, 2026 19:23
View session
Benoît Cortier (CBenoit)
disabled auto-merge
September 2, 2026 19:24
Benoît Cortier (CBenoit)
enabled auto-merge (squash)
September 2, 2026 19:24
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The populated RFC 3339 JSON representation lacks direct test coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the unpublished Agent Tunnel API to expose last-seen timestamps as RFC 3339 date-times.
Changes:
- Converts registry epoch milliseconds to
OffsetDateTime. - Updates API tests and OpenAPI schema.
- Regenerates TypeScript, .NET, and reference documentation.
File summaries
| File | Description |
|---|---|
testsuite/tests/cli/agent/tunnel.rs |
Updates the null-field assertion. |
devolutions-gateway/src/api/tunnel.rs |
Adds date-time conversion and API field. |
devolutions-gateway/openapi/ts-angular-client/model/agentInfo.ts |
Updates the TypeScript model. |
devolutions-gateway/openapi/gateway-api.yaml |
Declares the RFC 3339 field. |
devolutions-gateway/openapi/dotnet-client/src/Devolutions.Gateway.Client/Model/AgentInfo.cs |
Updates the .NET model. |
devolutions-gateway/openapi/dotnet-client/docs/AgentInfo.md |
Updates .NET model documentation. |
devolutions-gateway/openapi/doc/index.adoc |
Updates API reference documentation. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
irvingouj@Devolutions (irvingoujAtDevolution)
approved these changes
Sep 2, 2026
irvingouj@Devolutions (irvingoujAtDevolution)
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Benoît Cortier (CBenoit)
disabled auto-merge
September 2, 2026 19:46
Benoît Cortier (CBenoit)
deleted the
copilot/change-agentinfo-last-seen-serialization
branch
September 2, 2026 19:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unpublished Agent Tunnel API exposed
last_seen_ms: Option<u64>onAgentInfo, an implementation-unit-leaking encoding. Since the API/clients aren't published yet, this is the right time to switch to a semanticdate-timeboundary instead.API model (
devolutions-gateway/src/api/tunnel.rs)last_seen_ms: Option<u64>→last_seen: Option<time::OffsetDateTime>, serialized viatime::serde::rfc3339::option(consistent with the existingMonitorResult::request_start_timeconvention).last_seen_ms_to_datetime, a panic-free conversion from the registry's epoch-millisecondu64toOffsetDateTime, returningNoneon overflow instead of panicking.agent_tunnel::registry::AgentInfo::last_seen_msis unchanged — the registry still tracks milliseconds internally.Noneis still returned for agents with no runtime/tunnel heartbeat (offline agents).Tests
last_seen.u64::MAX) conversion.last_seen_ms→last_seen).Generated artifacts
Regenerated via the repository's existing
generate-openapiandgenerate_clientsscripts (no manual edits):gateway-api.yaml: field is nowtype: string, format: date-time, nullable: true.LastSeenMs(long?) →LastSeen(DateTime?), including removal of the now-obsolete minimum-value validation.last_seen_ms?: number | null→last_seen?: string | null.