Skip to content

Latest commit

 

History

History
115 lines (69 loc) · 4.23 KB

CONTRIBUTING.md

File metadata and controls

115 lines (69 loc) · 4.23 KB

Report Issues on GitHub Issues

We track public bugs and feature requests using GitHub issues. Please report by opening a new issue.

Effective Bug Reports should include:

  • A clear summary or background
  • Steps to reproduce the issue
    • Be as specific as possible
    • Include sample code when possible
  • What you expect to happen
  • What happened
  • Additional notes (e.g., why you think the issue occurs or solutions you’ve tried that didn’t work)

Contributing Code

Follow these steps before submitting a pull request:

Building the Project

go build ./...

This will download all dependencies and compile the project.

Running Tests

All test files are in the qdrant_test directory and use Testcontainers Go for integration tests.

Run the following command to execute the test suites:

go test -v ./...

This command pulls a Qdrant Docker image to run integration tests. Ensure Docker is running.

Formatting and Linting

Ensure your code is free from warnings and follows project standards.

The project uses Gofmt for formatting and golangci-lint for linting.

To format your code:

gofmt -s -w .

To lint your code:

golangci-lint run

Preparing for a New Release

Pre-requisites

The client uses generated stubs from upstream Qdrant proto definitions, which are downloaded from qdrant/qdrant.

Steps:

  1. Download and generate the latest client stubs by running the following command from the project root:
BRANCH=dev sh internal/tools/sync_proto.sh
  1. Update the TestImage value in qdrant_test/image_test.go to qdrant/qdrant:dev.

  2. Remove the gRPC server definitions from the auto-generated code.

There is currently no way to skip generating Go server definitions.

You’ll need to manually delete them from snapshots_service_grpc.pb.go, points_service_grpc.pb.go, and collections_service_grpc.pb.go.

Remove lines starting from comments like // CollectionsServer is the server API for Collections service. until the end of the file. Here’s an example commit.

  1. Implement new Qdrant methods in points.go, collections.go, or qdrant.go as needed and associated tests in qdrant_test/.

Since the API reference is published at https://pkg.go.dev/github.com/qdrant/go-client, the docstrings have to be appropriate.

  1. If there are any new oneOf properties in the proto definitions, add helper constructors to oneof_factory.go following the existing patterns.

  2. Run the linter, formatter and tests as per the instructions above.

  3. Submit your pull request and get those approvals.

Releasing a New Version

Once the new Qdrant version is live:

  1. Run the following command:
BRANCH=master sh internal/tools/sync_proto.sh
  1. Update the TestImage value in qdrant_test/image_test.go to qdrant/qdrant:vNEW_VERSION.

  2. Merge the pull request.

  3. Push a new Git tag to publish the version:

git tag v1.11.0
git push --tags
  1. Optionally, do a release at https://github.com/qdrant/go-client/releases from the tag with notes.