-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
VAULT-24945: audit - add context timeout to audit request #26616
Conversation
CI Results: |
Build Results: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
// isContextViable examines the supplied context to see if its own deadline would | ||
// occur later than a newly created context with a specific timeout. | ||
// If the existing context is viable it can be used 'as-is', if not, the caller | ||
// should consider creating a new context with the relevant deadline and associated | ||
// context values (e.g. namespace) in order to reduce the likelihood that the | ||
// audit system believes there is a failure in audit (and updating its metrics) | ||
// when the root cause is elsewhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As per: #24238, but for auditing requests.
This PR updates the logic used for request and response to check whether the existing context would suffice.