Skip to content

Commit 432d207

Browse files
authored
docs: Added new version update instructions (#53)
* docs: Updated CONTRIBUTING.md * Update CONTRIBUTING.md * Review updates CONTRIBUTING.md
1 parent 9600bb8 commit 432d207

File tree

1 file changed

+51
-40
lines changed

1 file changed

+51
-40
lines changed

CONTRIBUTING.md

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -52,73 +52,84 @@ If you are modifying code, make sure it has no warnings when building.
5252

5353
By contributing, you agree that your contributions will be licensed under its Apache License 2.0.
5454

55-
# Building the solution
55+
## Preparing for a New Release
5656

57-
The solution uses several open source software tools:
57+
The client uses generated stubs from upstream Qdrant proto definitions, which are downloaded from [qdrant/qdrant](https://github.com/qdrant/qdrant/tree/master/lib/api/src/grpc/proto).
5858

59-
## Docker
59+
The generated files do not form part of the checked-in source code. Instead, they are generated
60+
and emitted into the `build/generated/source directory`, and included in compilation.
6061

61-
Qdrant docker image is used to run integration tests. Be sure to
62-
[install docker](https://docs.docker.com/engine/install/) and have it running when running tests.
62+
### Pre-requisites
6363

64-
## Gradle
64+
Ensure the following are installed and available in the `PATH`.
6565

66-
[Gradle](https://docs.gradle.org/current/userguide/userguide.html) is used as the build automation tool for the solution.
67-
To get started after cloning the solution, it's best to run the gradlew wrapper script in the root
66+
- [Java 17](https://www.azul.com/downloads/?version=java-17-lts&package=jdk#zulu)
67+
- [Gradle](https://gradle.org/install/#with-a-package-manager).
68+
- [Docker](https://docs.docker.com/engine/install/) for tests.
6869

69-
for Windows
70+
If you're using IntelliJ IDEA, see [this section](#intellij-idea) for steps to handle an IntelliSense issue.
7071

71-
```
72+
### Steps
73+
74+
1. Update the values in [gradle.properties](https://github.com/qdrant/java-client/blob/master/gradle.properties) as follows:
75+
76+
- `packageVersion` - Bump it to the next minor version to be released.
77+
- `qdrantVersion` - Set it to `dev` to use the `dev` Docker image for testing.
78+
- `qdrantProtosVersion` - Set it to `dev` to use the `dev` branch for fetching the proto files.
79+
80+
2. Download and generate the latest client stubs by running the following command from the project root:
81+
82+
For Windows
83+
84+
```bash
7285
.\gradlew.bat build
7386
```
7487

75-
for OSX/Linux
88+
For OSX/Linux
7689

77-
```
90+
```bash
7891
./gradlew build
7992
```
8093

8194
This will
8295

83-
- Pull down all the dependencies for the build process as well as the solution
84-
- Run the default build task for the solution
96+
- Pull down all the dependencies for the build process and the project.
97+
- Run the default build task.
98+
- Run the integration tests. Ensure Docker running.
8599

86-
You can also compile the solution within IntelliJ or other IDEs if you prefer.
100+
If a Qdrant image with static tags like `dev` or `latest` already exists on your system, the tests will use it. You can remove these images before running the tests to fetch the most up-to-date versions.
87101

88-
## Tests
102+
3. Implement new Qdrant methods in [`QdrantClient.java`](https://github.com/qdrant/java-client/blob/master/src/main/java/io/qdrant/client/QdrantClient.java) with associated tests in [src/test](https://github.com/qdrant/java-client/tree/master/src/test/java/io/qdrant/client).
89103

90-
jUnit5 tests are run as part of the default build task. These can also be run with
104+
Since the API reference is published at <https://qdrant.github.io/java-client>, the docstrings have to be appropriate.
91105

92-
```
93-
./gradlew test
94-
```
106+
4. If there are any new complex/frequently used properties in the proto definitions, add factory classes in [`src/main`](https://github.com/qdrant/java-client/tree/master/src/main/java/io/qdrant/client) following the existing patterns.
95107

96-
## Updating the client
108+
5. Submit your pull request and get those approvals.
97109

98-
A large portion of the client is generated from the upstream qdrant proto definitions, which are
99-
downloaded locally as needed, based on the version defined by `qdrantProtosVersion` in gradle.properties
100-
in the root directory.
110+
### Releasing a New Version
101111

102-
When a new qdrant version is released upstream, update the `qdrantProtosVersion` value to the new version,
103-
then run the build script
112+
Once the new Qdrant version is live:
104113

105-
for Windows
114+
1. Update the values in [gradle.properties](https://github.com/qdrant/java-client/blob/master/gradle.properties) as follows and build as mentioned above:
106115

107-
```
108-
.\gradlew.bat build
109-
```
116+
- `qdrantVersion` - Set it to the released Docker image version for testing.
117+
- `qdrantProtosVersion` - Set it to the released version of the Qdrant source for fetching the proto files.
110118

111-
for OSX/Linux
119+
2. Merge the pull request.
112120

113-
```
114-
./gradlew build
115-
```
121+
3. Publish a new release at <https://github.com/qdrant/java-client/releases>. The CI will then publish the library to [mvnrepository.com/artifact/io.qdrant/client](https://mvnrepository.com/artifact/io.qdrant/client) and the docs to <https://qdrant.github.io/java-client>.
122+
123+
### IntelliJ IDEA
124+
125+
If you're using [IntelliJ IDEA](https://www.jetbrains.com/idea/), IntelliSense may fail to work correctly due to large source files generated from proto-definitions.
126+
127+
To resolve this, you can increase the file size limit by configuring IntelliJ IDEA as follows:
128+
129+
1. In the top menu, navigate to `Help` -> `Edit Custom Properties`.
116130

117-
A specific version of the qdrant docker image can be targeted by modifying the `qdrantVersion`
118-
in gradle.properties.
131+
2. Set the `idea.max.intellisense.filesize` properly to a higher value.
119132

120-
The generated files do not form part of the checked in source code. Instead, they are generated
121-
and emitted into the build/generated/source directory, and included in compilation.
133+
![Screenshot 2024-10-02 at 11 13 06 PM](https://github.com/user-attachments/assets/7830d22c-4b63-4a03-8a8b-fbdd7acf3454)
122134

123-
If upstream changes to proto definitions change the API of generated code, you may need
124-
to fix compilation errors in code that relies on that generated code.
135+
3. After saving the changes, restart the IDE to apply the new file size limit.

0 commit comments

Comments
 (0)