-
Notifications
You must be signed in to change notification settings - Fork 81
Add missing endpoints in general-request-handling #706
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
Conversation
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.
Pull Request Overview
This PR adds missing general request handling endpoints to the ArangoDB Go driver v2, specifically implementing admin version and status endpoints. The implementation includes proper handling of both database-scoped and global admin requests.
- Added
HandleAdminVersionmethod that provides an alias forGET /_admin/versionwith optional details - Updated
GetServerStatusto support both global (/_admin/status) and database-scoped (/_db/{name}/_admin/status) requests - Added comprehensive test coverage for both new and updated functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| v2/arangodb/client_server_info.go | Adds AdminVersionInfo struct and HandleAdminVersion interface method |
| v2/arangodb/client_server_info_impl.go | Implements HandleAdminVersion method with proper error handling |
| v2/arangodb/client_admin_impl.go | Updates GetServerStatus to handle empty dbName for global status requests |
| v2/tests/admin_test.go | Adds comprehensive tests for both HandleAdminVersion and updated GetServerStatus behavior |
| v2/CHANGELOG.md | Documents the addition of general-request-handling endpoints |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d458233 to
fe08d20
Compare
This PR includes the following general-request-handling- related endpoints:
Note
Introduces
_admin/versionvia new HandleAdminVersion and updates GetServerStatus to use global_admin/statuswhendbNameis empty, with expanded tests and minor test robustness improvements.HandleAdminVersion(opts)to fetch version via_admin/version(alias of_api/version).GetServerStatusto support both_db/{db}/_admin/statusand global_admin/statuswhendbNameis empty.Test_HandleAdminVersion(with/without options).Test_GetServerStatusto cover no DB, with DB, and invalid DB cases.v2/CHANGELOG.mdto note general-request-handling endpoints.Written by Cursor Bugbot for commit d7c7672. This will update automatically on new commits. Configure here.