-
Notifications
You must be signed in to change notification settings - Fork 886
bug: last_used_at
not updated when "activity" is sent via API /report-stats
#11986
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
Comments
I think this behaviour is as expected, see coder/coderd/workspaceagents.go Lines 1158 to 1164 in c6c71de
connections_by_proto: {"ssh": 1} to the request payload, but this would essentially mean inserting bogus agent stats as the rest of the fields would all be zero valued.
If the goal here is to extend the workspace autostop time, an alternative would be to use the
Note that this endpoint requires a session token and not just an agent token. |
It's very desirable for the agent token to be able to bump the activity so that user login is not required to accomplish this, as actual usage is in a crontab. Could the |
@mattlqx You don't need a human to interact with the workspace in order for that to work. You can retrieve a valid session token for the workspace owner using Does that address your use case? |
That helps, I'll give it a shot. |
It would be much better if |
I'm not sure if this is the right place to post, but I wanted to add it here. We also need similar functionality for dynamically extending the workspace runtime during use. We have scenarios like:
|
Would the ability to specify a positive delta to e.g.
|
I believe a simple endpoint that updates variable like It seems that basing shutdowns on user connections was not the best approach (PR). |
Just here to say that I too would like the ability to update the The following curl works to update the token, but it's suboptimal for the reasons listed above. I'm going to use it for now, but I'd love to have a proper way to do this.
|
#12659 introduces an API endpoint Edit on Sep 9 2024: As of Coder v2.13.0, the |
The above was included in v2.10.0. |
customers are looking to send an activity "ping" to workspaces to keep them from auto-shutting off. we have the below API call documented, but this does not update the workspace
last_used_at
time (retrieved via/api/v2/users/{user}/workspace/{workspace-name}
):The text was updated successfully, but these errors were encountered: