Thanks to visit codestin.com
Credit goes to github.com

Skip to content

agent connection timings rendering as negative values when agent cannot connect #15432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
defelmnq opened this issue Nov 7, 2024 · 6 comments
Assignees

Comments

@defelmnq
Copy link
Contributor

defelmnq commented Nov 7, 2024

I recently played with workspaces build and in some situations had workspaces struggling to be healthy.

While watching at the build timeline for this workspace - the connect step for the agent is displaying a weird value.

Image

Looking at the JSON for the endpoint, the ended_at field returned seems to be a Golang zero value.

{
    "started_at": "2024-11-07T17:52:51.485204Z",
    "ended_at": "0001-01-01T00:00:00Z",
    "stage": "connect",
    "workspace_agent_id": "67e37a9d-ccac-497e-8f48-4093bcc4f3e7",
    "workspace_agent_name": "main"
}

An easy way to reproduce is to create or modify an existing template and change the host value in the workspace - which will result in the agent being impossible to contact.

Image

Overall view of the workspace
Image

@bpmct
Copy link
Member

bpmct commented Feb 20, 2025

Related issue: https://coder.zendesk.com/agent/tickets/3527

@dannykopping dannykopping changed the title build timeline timings for struggling workspaces agent connection timings rendering as negative values when agent cannot connect Feb 21, 2025
@BrunoQuaresma
Copy link
Collaborator

@dannykopping instead of returning a golang zero value, would be possible to return null instead?

@dannykopping
Copy link
Contributor

Are you asking if it's possible technically, or whether I can make that change?
It's technically possible of course.

@BrunoQuaresma
Copy link
Collaborator

Both. If a date is "not defined", as consumer, I would expect it to be null instead of having a "zero value" related to a very specific language. Wdyt?

@dannykopping
Copy link
Contributor

I'm pretty swamped with other work so I won't have time to look at this soon, but yes I agree - this should've never sent back a zero value for the date.

@angrycub
Copy link
Contributor

@BrunoQuaresma on the UI side, can we assume that a zero value for this value is effectively null? If those times are golang durations, they're nanoseconds and zero would be impossible as a real value.

@Kira-Pilot Kira-Pilot assigned johnstcn and unassigned defelmnq Apr 23, 2025
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

No branches or pull requests

6 participants