Skip to content

chore: return context.Canceled when in Prepare for rbac #10763

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

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Nov 17, 2023

Was returning a custom rego canceled error. This conforms with how Authorize handles this error.

Closes #9986

Was returning a custom rego canceled error. This conforms with
how Authorize handles this error.
@Emyrk Emyrk requested a review from mtojek November 17, 2023 15:55
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Emyrk Emyrk enabled auto-merge (squash) November 17, 2023 16:00
Rego uses a go routine to track the ctx cancelled, so if the rego
query completes before that go routine even runs, or checks, then
there is no error. This is a race condition in how rego handles
context cancels.
@Emyrk Emyrk merged commit 0f17d7c into main Nov 17, 2023
@Emyrk Emyrk deleted the stevenmasley/rbac_prep_canceled branch November 17, 2023 20:29
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Internal error preparing sql filter" due to cancelled request reflects in HTTP500
2 participants