- Notifications
You must be signed in to change notification settings - Fork921
chore: accept payload on workspace usage route#13544
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
cli/portforward.go Outdated
@@ -137,7 +137,7 @@ func (r *RootCmd) portForward() *serpent.Command { | |||
listeners[i] = l | |||
} | |||
stopUpdating := client.UpdateWorkspaceUsageContext(ctx, workspace.ID) | |||
stopUpdating := client.UpdateWorkspaceUsageContext(ctx, workspace.ID, codersdk.PostWorkspaceUsageRequest{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
non-blocking: We might want to expose this as an app named "port-forward" or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I believe this will require we add a field to theworkspace_agent_stats
table which is a change I did not want to include in this PR. In general, do you think it's a good idea to add this field given it may impact other features like insights?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Let's leave it for now. I'd like to avoid any insights changes in the course of this refactor.
44d6913
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This adds new behavior to the workspace usage endpoint to accept a payload containing an
AgentID
andAppName
. This is so the CLI can start informing us of activity based on different "defined apps". This is currently behind an experiment flagworkspace-usage
which it will stay behind until we are reading to migrate fromworkspace_agent_stats
table toworkspace_app_stats
.