- Notifications
You must be signed in to change notification settings - Fork928
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 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.
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 👌
Uh oh!
There was an error while loading.Please reload this page.
705b9cc
intomainUh oh!
There was an error while loading.Please reload this page.
@@ -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 therbac.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 atGetProvisionerLogsAfterID
. As you can see, it is assumed that if you can fetch Job from the database, you can also readLogs
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.
Closescoder/internal#43 |
Related tocoder/internal#44