Skip to content

Commit 0181e03

Browse files
authored
chore: remove unused query failing to prepare (#11167)
1 parent 19c0cfd commit 0181e03

File tree

7 files changed

+1
-81
lines changed

7 files changed

+1
-81
lines changed

coderd/database/dbauthz/dbauthz.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/open-policy-agent/opa/topdown"
1717

1818
"cdr.dev/slog"
19+
1920
"github.com/coder/coder/v2/coderd/database"
2021
"github.com/coder/coder/v2/coderd/database/dbtime"
2122
"github.com/coder/coder/v2/coderd/httpapi/httpapiconstraints"
@@ -903,13 +904,6 @@ func (q *querier) GetAllTailnetAgents(ctx context.Context) ([]database.TailnetAg
903904
return q.db.GetAllTailnetAgents(ctx)
904905
}
905906

906-
func (q *querier) GetAllTailnetClients(ctx context.Context) ([]database.GetAllTailnetClientsRow, error) {
907-
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceTailnetCoordinator); err != nil {
908-
return []database.GetAllTailnetClientsRow{}, err
909-
}
910-
return q.db.GetAllTailnetClients(ctx)
911-
}
912-
913907
func (q *querier) GetAllTailnetCoordinators(ctx context.Context) ([]database.TailnetCoordinator, error) {
914908
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceTailnetCoordinator); err != nil {
915909
return nil, err

coderd/database/dbmem/dbmem.go

-4
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,6 @@ func (*FakeQuerier) GetAllTailnetAgents(_ context.Context) ([]database.TailnetAg
13571357
return nil, ErrUnimplemented
13581358
}
13591359

1360-
func (*FakeQuerier) GetAllTailnetClients(_ context.Context) ([]database.GetAllTailnetClientsRow, error) {
1361-
return nil, ErrUnimplemented
1362-
}
1363-
13641360
func (*FakeQuerier) GetAllTailnetCoordinators(context.Context) ([]database.TailnetCoordinator, error) {
13651361
return nil, ErrUnimplemented
13661362
}

coderd/database/dbmetrics/dbmetrics.go

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/dbmock/dbmock.go

-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/querier.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/tailnet.sql

-6
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,6 @@ WHERE id IN (
9797
WHERE tailnet_client_subscriptions.agent_id = $1
9898
);
9999

100-
-- name: GetAllTailnetClients :many
101-
SELECT sqlc.embed(tailnet_clients), array_agg(tailnet_client_subscriptions.agent_id)::uuid[] as agent_ids
102-
FROM tailnet_clients
103-
LEFT JOIN tailnet_client_subscriptions
104-
ON tailnet_clients.id = tailnet_client_subscriptions.client_id;
105-
106100
-- name: UpsertTailnetCoordinator :one
107101
INSERT INTO
108102
tailnet_coordinators (

0 commit comments

Comments
 (0)