You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i need to run integration tests on qdrant server but i do not want to go down with testcontainers heavy stuffs
so i just create mock servers and let clients request go through network but hit an especially forged mock server on the other side
for http server it is simple
for grpc i need server stubs too
but the qdrant go client have striped the server parts
so i propose to let the server stubs into the package to be able test the client in isolation to qdrant server
Current Behavior and Steps to Reproduce
at this time i created a script to locate proto files in qdrant go client module on go module cache and then generate the go code from those files
but i need to remove the client stubs bc they cannot co-exists in the same package bc of protobuf namespaces
panic: proto: file "collections.proto" is already registered
previously from: "github.com/aria3ppp/rag-server/gen/go/qdrantpb"
currently from: "github.com/qdrant/go-client/qdrant"
See https://protobuf.dev/reference/go/faq#namespace-conflict
so i have to remove the client parts and also link the proto messges to qdrant client
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:// - protoc-gen-go-grpc v1.5.1// - protoc (unknown)// source: collections_service.protopackage qdrantpb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
. "github.com/qdrant/go-client/qdrant"
)
// This is a compile-time assertion to ensure that this generated file// is compatible with the grpc package it is being compiled against.// Requires gRPC-Go v1.64.0 or later.const_=grpc.SupportPackageIsVersion9// CollectionsServer is the server API for Collections service.// All implementations must embed UnimplementedCollectionsServer// for forward compatibility.typeCollectionsServerinterface {
// Get detailed information about specified existing collectionGet(context.Context, *GetCollectionInfoRequest) (*GetCollectionInfoResponse, error)
// Get list name of all existing collectionsList(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error)
}
The text was updated successfully, but these errors were encountered:
aria3ppp
changed the title
allow server code generations
allow grpc server code generation stubs
Nov 23, 2024
i need to run integration tests on qdrant server but i do not want to go down with testcontainers heavy stuffs
so i just create mock servers and let clients request go through network but hit an especially forged mock server on the other side
for http server it is simple
for grpc i need server stubs too
but the qdrant go client have striped the server parts
so i propose to let the server stubs into the package to be able test the client in isolation to qdrant server
Current Behavior and Steps to Reproduce
at this time i created a script to locate proto files in qdrant go client module on go module cache and then generate the go code from those files
but i need to remove the client stubs bc they cannot co-exists in the same package bc of protobuf namespaces
so i have to remove the client parts and also link the proto messges to qdrant client
The text was updated successfully, but these errors were encountered: