-
Notifications
You must be signed in to change notification settings - Fork 853
Add AQL query recording. #21816
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
Add AQL query recording. #21816
Conversation
tests/js/client/shell/recording.js
Outdated
// API should exist, but might be disabled or require different permissions | ||
// We accept both success (200) and forbidden (403) as valid responses | ||
// indicating the endpoint exists | ||
assertTrue(doc.code === 200 || doc.code === 403 || doc.code === 404, |
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.
Why do we also accept 404, shouldn't that be an error since api was not found?
assertTrue(doc.code === 200 || doc.code === 403 || doc.code === 404, | |
assertTrue(doc.code === 200 || doc.code === 403 || doc.code === 404, |
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.
Done, I now only accept 200. This is just some LLM halluzination, which I did not catch.
@@ -328,3 +353,58 @@ void RestAdminServerHandler::handleApiCalls() { | |||
} | |||
generateOk(rest::ResponseCode::OK, builder.slice()); | |||
} | |||
|
|||
void RestAdminServerHandler::handleAqlQueries() { |
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.
I would expect this to be named something like handleAqlRecordingQueries
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.
Renamed.
This adds AQL query recording on a per server level.
This uses the same mechanisms as the API call recording.
A new API is exposed to deliver the recently executed queries.
This API should only be executable with admin access. There is a
config setting to restrict it to superuser or to switch it off in its
entirety.
Scope & Purpose
(Please describe the changes in this PR for reviewers, motivation, rationale - mandatory)
Checklist