Skip to content

Commit c0ae1ba

Browse files
committed
Remove stats API call, will follow up in another PR
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 3d77c63 commit c0ae1ba

File tree

13 files changed

+0
-379
lines changed

13 files changed

+0
-379
lines changed

coderd/apidoc/docs.go

Lines changed: 0 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 0 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ func New(options *Options) *API {
11531153
r.Get("/parameters", api.workspaceBuildParameters)
11541154
r.Get("/resources", api.workspaceBuildResourcesDeprecated)
11551155
r.Get("/state", api.workspaceBuildState)
1156-
r.Get("/stats", api.workspaceBuildStats)
11571156
})
11581157
r.Route("/authcheck", func(r chi.Router) {
11591158
r.Use(apiKeyMiddleware)

coderd/database/dbauthz/dbauthz.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,15 +1775,6 @@ func (q *querier) GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (data
17751775
return job, nil
17761776
}
17771777

1778-
func (q *querier) GetProvisionerJobStatsByWorkspace(ctx context.Context, arg database.GetProvisionerJobStatsByWorkspaceParams) (database.ProvisionerJobStat, error) {
1779-
// Use the workspace ID to authorize the request.
1780-
if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceWorkspace.WithID(arg.WorkspaceID)); err != nil {
1781-
return database.ProvisionerJobStat{}, err
1782-
}
1783-
1784-
return q.db.GetProvisionerJobStatsByWorkspace(ctx, arg)
1785-
}
1786-
17871778
// TODO: we need to add a provisioner job resource
17881779
func (q *querier) GetProvisionerJobsByIDs(ctx context.Context, ids []uuid.UUID) ([]database.ProvisionerJob, error) {
17891780
// if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil {

coderd/database/dbmem/dbmem.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,30 +3172,6 @@ func (q *FakeQuerier) GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (
31723172
return q.getProvisionerJobByIDNoLock(ctx, id)
31733173
}
31743174

3175-
func (*FakeQuerier) GetProvisionerJobStatsByWorkspace(_ context.Context, arg database.GetProvisionerJobStatsByWorkspaceParams) (database.ProvisionerJobStat, error) {
3176-
err := validateDatabaseType(arg)
3177-
if err != nil {
3178-
return database.ProvisionerJobStat{}, err
3179-
}
3180-
3181-
return database.ProvisionerJobStat{
3182-
JobID: arg.JobID,
3183-
JobStatus: database.ProvisionerJobStatusSucceeded,
3184-
WorkspaceID: arg.WorkspaceID,
3185-
WorkerID: uuid.NullUUID{UUID: uuid.New(), Valid: true},
3186-
Error: sql.NullString{},
3187-
ErrorCode: sql.NullString{},
3188-
UpdatedAt: dbtime.Now(),
3189-
QueuedSecs: 0.1,
3190-
CompletionSecs: 10,
3191-
CanceledSecs: 0,
3192-
InitSecs: 1,
3193-
PlanSecs: 2,
3194-
GraphSecs: 3,
3195-
ApplySecs: 4,
3196-
}, nil
3197-
}
3198-
31993175
func (q *FakeQuerier) GetProvisionerJobsByIDs(_ context.Context, ids []uuid.UUID) ([]database.ProvisionerJob, error) {
32003176
q.mutex.RLock()
32013177
defer q.mutex.RUnlock()

coderd/database/dbmetrics/dbmetrics.go

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/dbmock/dbmock.go

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/querier.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

Lines changed: 0 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/provisionerjobs.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,3 @@ SELECT
156156
unnest(@action::text[]) AS action,
157157
unnest(@resource::text[]) AS resource
158158
RETURNING *;
159-
160-
-- We include the workspace here so we can authorize the request correctly.
161-
-- name: GetProvisionerJobStatsByWorkspace :one
162-
SELECT * FROM provisioner_job_stats
163-
WHERE job_id = @job_id::uuid AND workspace_id = @workspace_id::uuid
164-
LIMIT 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy