Skip to content
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

Gh-3292: REST API Gremlin Timeout and Execute Endpoints #3294

Merged
merged 12 commits into from
Sep 19, 2024

Conversation

tb06904
Copy link
Member

@tb06904 tb06904 commented Sep 13, 2024

Adds configurable timeout to the REST API for gremlin queries, also enables running queries via endpoints as well as the normal websocket. Few bits of tidying as well.

Related issue

@tb06904 tb06904 added enhancement Improvement to existing functionality/feature rest-api Specific to/touches a part of the REST API labels Sep 13, 2024
@tb06904 tb06904 added this to the 2.3.1 milestone Sep 13, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

* @return A pair tuple with result and explain in.
*/
private Tuple2<Object, JSONObject> runGremlinQuery(final String gremlinQuery) {
LOGGER.info("QUERY IS: {} ", gremlinQuery);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AZHsM-bbcRvAPM1MQKot-->Change this code to not log user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=gchq_Gaffer&issues=AZHsM-bbcRvAPM1MQKot&open=AZHsM-bbcRvAPM1MQKot&pullRequest=3294">SonarCloud</a></p>
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 93.50649% with 5 lines in your changes missing coverage. Please review.

Project coverage is 67.80%. Comparing base (1099bef) to head (d6ad45c).

Files with missing lines Patch % Lines
...gchq/gaffer/rest/controller/GremlinController.java 94.44% 3 Missing ⚠️
.../uk/gov/gchq/gaffer/rest/config/GremlinConfig.java 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3294      +/-   ##
=============================================
+ Coverage      67.76%   67.80%   +0.04%     
  Complexity      2594     2594              
=============================================
  Files            947      947              
  Lines          30217    30267      +50     
  Branches        3338     3338              
=============================================
+ Hits           20476    20524      +48     
- Misses          8274     8276       +2     
  Partials        1467     1467              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

p29876
p29876 previously approved these changes Sep 16, 2024
@j69772 j69772 merged commit 6471de9 into develop Sep 19, 2024
21 of 23 checks passed
@j69772 j69772 deleted the gh-3292-restapi-gremlin-timeout branch September 19, 2024 10:04
Copy link

sonarcloud bot commented Sep 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing functionality/feature rest-api Specific to/touches a part of the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST API has fixed timeout for Gremlin
5 participants