Skip to content

Conversation

@DemetrisChr
Copy link
Contributor

Enables using the SDK against a gateway implementing the couchbase2/protostellar protocol. Enabled via the couchbase2:// scheme in the connection string.

Changes

  • Add a PermissionDenied error which has been specified in the Draft RFC - currently marked as uncommitted.
  • Add a dependency to grpc and a dev dependency to grpc-tools that is needed for the protocol buffers compiler and for generating the gRPC client code
  • Add rake task (rake generate) that generates the protobuf & gRPC client code
  • Add a deps directory with protobuf definitions with the protostellar definitions as a submodule and a copy of the google/rpc/status protobuf definition that is required by protostellar
  • Add the generated gRPC/protobuf code
  • Add classes that are the protostellar equivalents of Cluster, Bucket,Scope, Collection, BucketManager, CollectionManager, QueryIndexManager, CollectionQueryIndexManager. They expose the same interface as the existing ones
  • Add helpers to generate protostellar requests and convert the responses to SDK results, all included in the RequestGenerator and ResponseConverter modules.
  • Add helpers for protostellar error handling (converting gRPC status to SDK errors and retry behaviours)
  • Add retry handling (originally done within the C++ core but it needs to be done in Ruby for protostellar). Implemented the retry reasons, the retry orchestrator, and the Best Effort retry strategy as specified by the retry handling RFC
  • Small modifications in the test suite to skip some tests for functionality not currently supported in protostellar and to account for different behaviour. A few of the errors returned by Protostellar are intentionally more generic (e.g. returns InvalidArgument instead of PathInvalid)

@cb-sdk-robot
Copy link
Collaborator

Can one of the admins verify this patch?

@DemetrisChr DemetrisChr requested a review from avsej November 9, 2023 17:00
@DemetrisChr DemetrisChr merged commit 3622357 into couchbase:main Nov 14, 2023
@DemetrisChr DemetrisChr deleted the protostellar branch November 14, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants