Skip to content
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

Enable admins to view all resources on the status page #6489

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7850c8a
check admin for resource listing
grahamplata Jan 23, 2025
bcfaedb
Support `filters: enable:` in the canvas YAML (#6485)
begelundmuller Jan 23, 2025
f822006
Increase health check concurrency to 32 (#6488)
begelundmuller Jan 23, 2025
4d751cb
fix : db file does not get deleted if mutate/rename gets errored/canc…
k-anshul Jan 24, 2025
b9dfa25
Increase timeout for graceful controller shutdown to 30s (#6500)
begelundmuller Jan 24, 2025
351e363
Fix broken project status page when there are same messages (#6510)
AdityaHegde Jan 27, 2025
8bce8ac
Update multiple-olap.md (#6024)
jkhwu Jan 27, 2025
800a11a
feat: add quick actions for pivot (#6505)
mindspank Jan 27, 2025
43cb741
fix: embedded dashboards without time series (#6496)
briangregoryholmes Jan 27, 2025
51887c4
update protos and adjust impl
grahamplata Jan 27, 2025
baa6274
Canvas: Grid and Layout (#6438)
lovincyrus Jan 27, 2025
a7c706f
feat: project initialization tests (#6515)
briangregoryholmes Jan 28, 2025
9930453
fix disk leaks by simplifying reference counting in rduckdb catalog (…
k-anshul Jan 29, 2025
1a375ae
Fix unwarranted panic in DeleteMagicAuthTokens (#6516)
begelundmuller Jan 29, 2025
bfe32a8
only admins can skip
grahamplata Jan 29, 2025
b7ee295
fix : Some more disk leaks fixes (#6524)
k-anshul Jan 29, 2025
8bf7a5e
Lazy evaluation of timestamps for metrics queries (#6526)
begelundmuller Jan 29, 2025
c28ac00
fix : Avoid hard dependencies on github (#6527)
k-anshul Jan 29, 2025
8aa9198
Set max date for public url form (#6513)
lovincyrus Jan 29, 2025
4821496
fix: rill time issues around truncate and arithmatic (#6509)
AdityaHegde Jan 30, 2025
9ba4d26
docs: release notes 0.54 (#6532)
mindspank Jan 30, 2025
bc1f8f8
fix : do not delete projects if github app is suspended (#6535)
k-anshul Jan 30, 2025
81dbf94
fix (Breadcrumbs): Missing label for projects outside the first page …
ericpgreen2 Jan 30, 2025
0b87431
fix: public urls with computed measures and dependant measures are hi…
AdityaHegde Jan 30, 2025
66b2c5c
Remove circular dependency on the metrics project (#6536)
begelundmuller Jan 30, 2025
52b4b10
Add API resolver properties back (#6537)
begelundmuller Jan 30, 2025
918ea25
set ctx on batches so they respond to cancellation (#6538)
k-anshul Jan 30, 2025
22cfb69
.env auto deploy docs (#6479)
royendo Jan 30, 2025
f13fc13
docs: friendlier language (#6539)
mindspank Jan 30, 2025
e945c3c
fix: checkbox indicator lag (#6511)
briangregoryholmes Jan 30, 2025
c2b8107
feat: Show custom logo in UI (#6530)
AdityaHegde Jan 31, 2025
641cddf
reduce the amount of data that needs to be kept in memory while downl…
k-anshul Jan 31, 2025
af9a570
fix: removes search for listings in cloud (#6551)
mindspank Jan 31, 2025
17a02de
fix: dont show warning when not switching model (#6552)
mindspank Jan 31, 2025
bd1ab41
Environment variables: input validation to protect against duplicate …
lovincyrus Jan 31, 2025
6729ee9
handle multiple errors and flush to opentel callback (#6545)
grahamplata Jan 31, 2025
97487a0
Add Organization email and plan to init logs (#6519)
grahamplata Jan 31, 2025
569c023
chore: class cleanup (#6498)
briangregoryholmes Jan 31, 2025
8a22a74
fix: do not log cancellation errors in worker jobs (#6540)
k-anshul Feb 3, 2025
d61e3f8
feat: file upload input (#6487)
AdityaHegde Feb 3, 2025
3e048ed
List measures & dimensions by the order specified in the Explore (#6555)
ericpgreen2 Feb 3, 2025
35407c5
feat: Custom logo UI support (#6521)
AdityaHegde Feb 3, 2025
4eeb846
adjust controller fow
grahamplata Feb 3, 2025
5c4b853
update proto def
grahamplata Feb 3, 2025
ad5843f
Improves DSN config error messages that are confusing in cloud (#6565)
begelundmuller Feb 3, 2025
56cd169
Canvas: Inline add components (#6529)
lovincyrus Feb 3, 2025
15ee9b7
Support custom attributes in `mock_users` and `IssueDevJWT` (#6518)
begelundmuller Feb 3, 2025
9889423
check admin for resource listing
grahamplata Jan 23, 2025
7a9415e
Merge branch 'gplata/admin-status-page-1129' of github.com:rilldata/r…
grahamplata Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,215 changes: 618 additions & 597 deletions proto/gen/rill/runtime/v1/api.pb.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions proto/gen/rill/runtime/v1/api.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions proto/gen/rill/runtime/v1/runtime.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,10 @@ paths:
in: query
required: false
type: string
- name: skipChecks
in: query
required: false
type: boolean
tags:
- RuntimeService
/v1/instances/{instanceId}/resources:
Expand Down Expand Up @@ -2573,6 +2577,11 @@ paths:
in: query
required: false
type: string
- name: skipChecks
description: Skip security checks
in: query
required: false
type: boolean
tags:
- RuntimeService
/v1/instances/{instanceId}/resources/-/watch:
Expand Down
3 changes: 3 additions & 0 deletions proto/rill/runtime/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,8 @@ message ListResourcesRequest {
string kind = 2;
// Filter by resource path (optional).
string path = 3;
// Skip security checks
bool skip_checks = 4;
grahamplata marked this conversation as resolved.
Show resolved Hide resolved
}

message ListResourcesResponse {
Expand All @@ -673,6 +675,7 @@ message WatchResourcesResponse {
message GetResourceRequest {
string instance_id = 1;
ResourceName name = 2;
bool skip_checks = 3;
}

message GetResourceResponse {
Expand Down
7 changes: 5 additions & 2 deletions runtime/server/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (s *Server) ListResources(ctx context.Context, req *runtimev1.ListResources
observability.AddRequestAttributes(ctx,
attribute.String("args.instance_id", req.InstanceId),
attribute.String("args.kind", req.Kind),
attribute.Bool("args.skip_checks", req.SkipChecks),
)

if !auth.GetClaims(ctx).CanInstance(req.InstanceId, auth.ReadObjects) {
Expand Down Expand Up @@ -68,7 +69,8 @@ func (s *Server) ListResources(ctx context.Context, req *runtimev1.ListResources
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
if !access {
// Check of the request is to skip security checks
if !req.SkipChecks && !access {
grahamplata marked this conversation as resolved.
Show resolved Hide resolved
// Remove from the slice
rs[i] = rs[len(rs)-1]
rs[len(rs)-1] = nil
Expand Down Expand Up @@ -155,6 +157,7 @@ func (s *Server) GetResource(ctx context.Context, req *runtimev1.GetResourceRequ
attribute.String("args.instance_id", req.InstanceId),
attribute.String("args.name.kind", req.Name.Kind),
attribute.String("args.name.name", req.Name.Name),
attribute.Bool("args.skip_checks", req.SkipChecks),
)

if !auth.GetClaims(ctx).CanInstance(req.InstanceId, auth.ReadObjects) {
Expand All @@ -178,7 +181,7 @@ func (s *Server) GetResource(ctx context.Context, req *runtimev1.GetResourceRequ
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
if !access {
if !req.SkipChecks && !access {
grahamplata marked this conversation as resolved.
Show resolved Hide resolved
return nil, status.Error(codes.NotFound, "resource not found")
}

Expand Down
14 changes: 14 additions & 0 deletions web-common/src/proto/gen/rill/runtime/v1/api_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,13 @@ export class ListResourcesRequest extends Message<ListResourcesRequest> {
*/
path = "";

/**
* Skip security checks
*
* @generated from field: bool skip_checks = 4;
*/
skipChecks = false;

constructor(data?: PartialMessage<ListResourcesRequest>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -2812,6 +2819,7 @@ export class ListResourcesRequest extends Message<ListResourcesRequest> {
{ no: 1, name: "instance_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "skip_checks", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListResourcesRequest {
Expand Down Expand Up @@ -2986,6 +2994,11 @@ export class GetResourceRequest extends Message<GetResourceRequest> {
*/
name?: ResourceName;

/**
* @generated from field: bool skip_checks = 3;
*/
skipChecks = false;

constructor(data?: PartialMessage<GetResourceRequest>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -2996,6 +3009,7 @@ export class GetResourceRequest extends Message<GetResourceRequest> {
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "instance_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "name", kind: "message", T: ResourceName },
{ no: 3, name: "skip_checks", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetResourceRequest {
Expand Down
2 changes: 2 additions & 0 deletions web-common/src/runtime-client/gen/index.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ export type RuntimeServiceWatchResourcesParams = {
export type RuntimeServiceListResourcesParams = {
kind?: string;
path?: string;
skipChecks?: boolean;
};

export type RuntimeServiceGetResourceParams = {
"name.kind"?: string;
"name.name"?: string;
skipChecks?: boolean;
};

export type QueryServiceExportReportBody = {
Expand Down
Loading