Skip to content

RBAC filtering truncates filterset instead of returning error if context expires #7114

Closed
@spikecurtis

Description

@spikecurtis

When we use the RBAC filter, you pass a context. If the context expires before we're done filtering, we return a truncated set of objects passing the filter and no error. We should return an empty filterset and whatever error came from the context.

This leads to strange test flakes like:

=== FAIL: coderd/rbac TestFilter/ManyRoles (5.07s)
    authz_internal_test.go:197: 
        	Error Trace:	/home/runner/work/coder/coder/coderd/rbac/authz_internal_test.go:197
        	Error:      	Not equal: 
        	            	expected: 32
        	            	actual  : 29
        	Test:       	TestFilter/ManyRoles
        	Messages:   	expected number of allowed

=== FAIL: coderd/rbac TestFilter (0.00s)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions