Add a new GLQL query service and update the base controller to use it
What does this MR do and why?
Add a new GLQL query service and update the base controller to use it
This is needed because we want the same logging and rate limiting logic for both the GraphQL and REST APIs. Logging is refined in Add a new GLQL logging service and update the q... (!211941).
This shouldn't change the existing API, rate limits, or logging outputs. It only moves them to a shared service. For how the service is being used, you can look at Draft: Create a new GLQL REST API for Duo integ... (!209517)
References
Related to #578342
Screenshots or screen recordings
| Scenario | Before | After |
|---|---|---|
| Success |
|
|
| Rate limited |
|
|
| Timed out |
|
|
| Forbidden |
|
|
| General error |
|
|
How to set up and validate locally
You may wish to run gdk cleanup to have clean logs before you test.
For verifying the UI still works:
- Open a markdown or description field, for instance, an issue comment.
- Add a GLQL query to the comment, e.g. (remove
\):\`\`\`glql display: table fields: title, state, assignee, updated sort: updated desc query: project = "gitlab-duo/test" and type = Issue \`\`\` - Verify that the GLQL query converts to an embedded view when previewing the comment or submitting to the issue.
For verifying logs still add glql_referer and glql_query_sha:
- Open
<GITLAB_REPO_DIR>/log/development_json.log - Find the log for the GLQL request
- Verify the values added to the log
MR acceptance checklist
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.









