-
Notifications
You must be signed in to change notification settings - Fork 937
feat(coderd): add workspace timings endpoint #14648
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
Conversation
Co-authored-by: Aaron Lehmann <alehmann@netflix.com>
…oner-timings-endpoint
…coder/coder into bq/provisioner-timings-endpoint
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.
Great work @BrunoQuaresma!
One minor suggestion but otherwise 👌
@@ -1791,6 +1791,10 @@ func (q *querier) GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (data | |||
return job, nil | |||
} | |||
|
|||
func (q *querier) GetProvisionerJobTimingsByJobID(ctx context.Context, jobID uuid.UUID) ([]database.ProvisionerJobTiming, error) { | |||
return q.db.GetProvisionerJobTimingsByJobID(ctx, jobID) |
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.
@BrunoQuaresma I missed this yesterday; we need to ensure the user can read the workspace build in order to read the timings, otherwise we might leak some information.
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.
+1
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 don't see any RBAC resource related to the workspace build. The closest that I see is the rbac.ResourceWorkspace
, does it work?
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 think you can take a look at GetProvisionerLogsAfterID
. As you can see, it is assumed that if you can fetch Job from the database, you can also read Logs
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.
@mtojek even better, ty
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.
Closes coder/internal#43 |
Related to coder/internal#44