feat(arcadedb): add source and tools#2961
feat(arcadedb): add source and tools#2961Deeven-Seru wants to merge 1 commit intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for ArcadeDB as a new data source, including implementations for executing Cypher and SQL queries. The code changes include the necessary source registration, tool implementations, and documentation. I have identified a potential panic in the Cypher execution plan logic that requires a nil check, as well as several documentation files that violate the repository's style guide regarding frontmatter-only content and title naming conventions.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds ArcadeDB as a new data source, enabling Cypher and SQL query execution via the Bolt protocol. It includes the source implementation, tool definitions, unit tests, and documentation. Review feedback identifies a naming inconsistency in the execution plan's JSON keys and recommends implementing read-only and dry-run modes for the SQL tool to ensure consistency and safety across query tools.
|
/gcbrun |
3 similar comments
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
|
@stenalpjolly /gcburn is what maintainers do :) |
|
@Deeven-Seru I'm from Google only. I was testing my maintainer access for the org |
b1669f5 to
dd29eb2
Compare
dd29eb2 to
09f6432
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for ArcadeDB and Conversational Analytics, adding new sources and tools along with their respective documentation, prebuilt configurations, and integration tests. It also includes dependency updates and improvements to existing documentation samples. Feedback is provided to enhance the robustness of the new HTTP-based tools by ensuring that context is correctly propagated to all network requests and that HTTP client instances are configured with appropriate timeouts to prevent hanging operations.
09f6432 to
82d9ec2
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces ArcadeDB as a new data source, including a source driver and tools for executing Cypher and SQL queries. It also refactors conversational analytics tools to improve context handling and HTTP client timeouts. Feedback was provided to ensure documentation adheres to style guides regarding frontmatter and title naming, to remove redundant configuration logic, to maintain consistent JSON keys in execution plans, and to improve security and performance through query parameterization and HTTP client reuse.
cf53393 to
b2c982b
Compare
|
Thanks @Deeven-Seru for picking this up, and @duwenxin99 for looping me in. The overall shape matches what we agreed in #2689: a dedicated A few items I'd like to see addressed before merge, and a couple of things worth verifying. Blocking1. 2. Query parameters are hardcoded to 3. Driver is never closed. 4. Redundant Nits5. Inconsistent JSON key casing in execution plan output. 6. Unrelated conversationalanalytics changes. Worth verifying7. 8. Classifier coverage for ArcadeDB-specific Cypher. OfferOnce these are addressed, I'll test the branch end-to-end against a live ArcadeDB (Cypher + SQL, read-only enforcement, dry-run plan output) and post results here. Happy to also contribute a basic integration-test harness in a follow-up if the maintainers want one. Thanks again for the work on this. |
a8be80f to
26349e7
Compare
|
Thanks @Deeven-Seru, nice turnaround on the blocking items. Quick takes on both open questions: 1. SQL readOnly allow-listI'd keep it narrow for v1 and not add The reason is that in ArcadeDB SQL both keywords are almost always used inside script-mode bodies, not as standalone read statements, and a first-token classifier can't see past them into what they actually do:
Adding these to a first-token allow-list would silently let writes slip through readOnly mode. Safer to stay strict, let real user query samples tell us which read-only patterns are being blocked, and then either extend the list case-by-case or swap in a proper parser-based classifier. A strict default is easy to loosen; a permissive one that let a Current list ( 2. Cypher dry-run with partial plan outputMy preference: return the partial payload with an explicit
One carve-out: if the plan payload is completely empty (zero operators at all), I'd treat that as an error rather than partial. An empty plan almost certainly means the server-side EXPLAIN didn't produce anything usable on that version, and returning a silent empty object is more misleading than helpful. So: empty → error, partial → flagged payload. Next step from my sideOnce you push the updated PR, I'll run the end-to-end test against a live ArcadeDB (Cypher + SQL, readOnly enforcement across the cases above, dry-run plan output on a current server build) and post results here. If the partial-plan case shows up in practice I'll include concrete output so we can calibrate the warning threshold. |
350dc3c to
f3f0460
Compare
|
@lvca thanks for answering , PTAL at the pr |
f3f0460 to
623372a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for ArcadeDB as a new data source, including tools for executing Cypher and SQL queries. The implementation includes the necessary source configuration, tool logic, and comprehensive documentation. Feedback is provided regarding documentation structure violations (specifically the inclusion of body text in index files), tool naming conventions, and the use of a more robust HTTP client for SQL execution.
| ArcadeDB is a multi-model database that supports graph (Cypher), document (SQL), | ||
| key-value, and time-series workloads in a single engine. |
There was a problem hiding this comment.
The root _index.md file for an integration must contain strictly only YAML frontmatter and no markdown body text.
References
- Ensure the root _index.md file contains strictly only frontmatter and no markdown body text. (link)
| no_list: true | ||
| --- | ||
|
|
||
| {{< list-tools >}} |
There was a problem hiding this comment.
The tools/_index.md file must contain strictly only YAML frontmatter. The {{< list-tools >}} shortcode should be removed from the body.
References
- The tools/ directory must contain an _index.md file consisting strictly of frontmatter. (link)
| @@ -0,0 +1,46 @@ | |||
| --- | |||
| title: "arcadedb-execute-cypher" | |||
There was a problem hiding this comment.
Tool names must be in snake_case (e.g., arcadedb_execute_cypher). Additionally, the title in the YAML frontmatter for tool documentation should follow the format: kebab-case tool name followed by ' Tool'.
| title: "arcadedb-execute-cypher" | |
| title: "arcadedb-execute-cypher Tool" |
References
- Tool names must be in snake_case.
- For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.
| @@ -0,0 +1,48 @@ | |||
| --- | |||
| title: "arcadedb-execute-sql" | |||
There was a problem hiding this comment.
Tool names must be in snake_case (e.g., arcadedb_execute_sql). Additionally, the title in the YAML frontmatter for tool documentation should follow the format: kebab-case tool name followed by ' Tool'.
| title: "arcadedb-execute-sql" | |
| title: "arcadedb-execute-sql Tool" |
References
- Tool names must be in snake_case.
- For tool documentation files, the title in the YAML frontmatter should use kebab-case for the tool name, followed by ' Tool'.
| req.SetBasicAuth(s.User, s.Password) | ||
| req.Header.Set("Content-Type", "application/json") | ||
|
|
||
| resp, err := http.DefaultClient.Do(req) |
There was a problem hiding this comment.
Using http.DefaultClient is discouraged in production code as it lacks a default timeout, which can lead to resource exhaustion if the server hangs. It is better to define a custom client with a reasonable timeout.
| resp, err := http.DefaultClient.Do(req) | |
| var arcadeHTTPClient = &http.Client{ | |
| Timeout: 30 * time.Second, | |
| } | |
| // ... inside RunSQL ... | |
| resp, err := arcadeHTTPClient.Do(req) |
| return "", fmt.Errorf("unable to parse host from arcade uri %q", s.Uri) | ||
| } | ||
| // ArcadeDB HTTP API defaults to 2480. | ||
| return fmt.Sprintf("http://%s:2480/api/v1/command/%s", host, s.ArcadeDBDatabase()), nil |
Summary
This PR implements native ArcadeDB support in the GenAI Toolbox by introducing a new
arcadedbsource and two associated tools for executing Cypher and SQL queries.ArcadeDB is a multi-model database supporting graph, document, key-value, and time-series workloads through the Bolt protocol. Since it is compatible with the Neo4j driver, this implementation reuses the existing
neo4j-go-driver, enabling seamless integration with minimal additional complexity.This change resolves the feature request to add ArcadeDB as a supported source in the Toolbox.
Fixes: #2689
What This PR Adds
1) New Source:
arcadedbA fully functional source implementation that:
arcadedbKey capabilities:
2) New Tool:
arcadedb-execute-cypherExecutes OpenCypher queries against ArcadeDB.
Features:
Example: