Skip to content

Commit cce5ec0

Browse files
authored
update instructions for publishing, cleanup READMEs, prepare to release v24.1.1 (#250)
1 parent 1f66396 commit cce5ec0

File tree

13 files changed

+217
-121
lines changed

13 files changed

+217
-121
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/),
66

7-
## [24.1.0] - 2024-12-06
7+
## [24.1.1] - 2024-12-13
88

99
### Added
1010

PUBLISHING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ This document contains instructions to publish dgraph4j build artefacts to Maven
1313
- Note down the short version of the Key ID: `gpg --list-keys --keyid-format short`.
1414
- Generate a secret key ring file if not present: `gpg --export-secret-keys -o /path/to/.gnupg/secring.gpg`.
1515
- Publish the keys to the MIT server: `gpg --send-keys <key-id>` (Maven Central will check for keys here).
16-
- Create `~/.gradle/gradle.properties` and populate it with all the credentials:
16+
- Create `~/.gradle/gradle.properties` and populate it with all the credentials
17+
- Get the credentials from `profile` section after loggin into [Sonatype](https://oss.sonatype.org/)
1718

1819
```
1920
signing.keyId=<…keyId…>
2021
signing.password=<…password…>
2122
signing.secretKeyRingFile=</path/to/.gnupg/secring.gpg>
2223
23-
ossrhUsername=dgraph
24-
ossrhPassword=<…password…>
24+
ossrhUsername=<username>
25+
ossrhPassword=<token>
2526
```
2627

2728
### Deploying
@@ -33,7 +34,7 @@ ossrhPassword=<…password…>
3334
- Update `dgraph4j version` in `grpc-netty` table in README.
3435
- Update CHANGELOG.
3536
- Raise a PR for the above changes. Put the changelog in PR description and merge it.
36-
- Run `./gradlew uploadArchives`.
37+
- Run `./gradlew publishAllPublicationsToMavenRepository`.
3738
- Release the deployment by following the steps on the page _Releasing the Deployment_ (link in references below).
3839
- Also cut a release tag on GitHub with the new version.
3940

README.md

Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
A minimal implementation for a Dgraph client for Java 11 and above, using [grpc].
77

8-
### IMP NOTE:
8+
### IMP NOTE:
99
v24.0.0 features an upgraded protobuf dependency which requires an upgrade to JDK 11. On account of this breaking change, all legacy applications built upon JDK 8 would be impacted.
1010

1111
[grpc]: https://grpc.io/
@@ -22,28 +22,41 @@ and understand how to run and work with Dgraph.
2222
**Use [Discuss Issues](https://discuss.dgraph.io/c/issues/35/clients/46) for reporting issues about this repository.**
2323

2424
## Table of Contents
25-
- [Download](#download)
26-
- [Supported Versions](#supported-versions)
27-
- [Quickstart](#quickstart)
28-
- [Intro](#intro)
29-
- [Using the Synchronous Client](#using-the-synchronous-client)
30-
* [Creating a Client](#creating-a-client)
31-
* [Creating a Client for Dgraph Cloud](#creating-a-client-for-dgraph-cloud)
32-
* [Creating a Secure Client Using TLS](#creating-a-secure-client-using-tls)
33-
* [Check Dgraph Version](#check-dgraph-version)
34-
* [Login Using ACL](#login-using-acl)
35-
* [Altering the Database](#altering-the-database)
36-
* [Creating a Transaction](#creating-a-transaction)
37-
* [Running a Mutation](#running-a-mutation)
38-
* [Committing a Transaction](#committing-a-transaction)
39-
* [Running a Query](#running-a-query)
40-
* [Running a Query with RDF response](#running-a-query-with-rdf-response)
41-
* [Running an Upsert: Query + Mutation](#running-an-upsert-query--mutation)
42-
* [Running a Conditional Upsert](#running-a-conditional-upsert)
43-
* [Setting Deadlines](#setting-deadlines)
44-
* [Setting Metadata Headers](#setting-metadata-headers)
45-
* [Helper Methods](#helper-methods)
46-
* [Closing the DB Connection](#closing-the-db-connection)
25+
- [Dgraph Client for Java](#dgraph-client-for-java)
26+
- [IMP NOTE:](#imp-note)
27+
- [Table of Contents](#table-of-contents)
28+
- [Download](#download)
29+
- [Supported Versions](#supported-versions)
30+
- [Note regarding Java 1.8.x support:](#note-regarding-java-18x-support)
31+
- [Quickstart](#quickstart)
32+
- [Intro](#intro)
33+
- [Using the Synchronous Client](#using-the-synchronous-client)
34+
- [Creating a Client](#creating-a-client)
35+
- [Creating a Client for Dgraph Cloud](#creating-a-client-for-dgraph-cloud)
36+
- [Creating a Secure Client using TLS](#creating-a-secure-client-using-tls)
37+
- [Check Dgraph version](#check-dgraph-version)
38+
- [Login Using ACL](#login-using-acl)
39+
- [Altering the Database](#altering-the-database)
40+
- [Creating a Transaction](#creating-a-transaction)
41+
- [Running a Mutation](#running-a-mutation)
42+
- [Committing a Transaction](#committing-a-transaction)
43+
- [Running a Query](#running-a-query)
44+
- [Running a Query with RDF response](#running-a-query-with-rdf-response)
45+
- [Running an Upsert: Query + Mutation](#running-an-upsert-query--mutation)
46+
- [Running a Conditional Upsert](#running-a-conditional-upsert)
47+
- [Setting Deadlines](#setting-deadlines)
48+
- [Setting deadlines for all requests](#setting-deadlines-for-all-requests)
49+
- [Setting deadlines for a single request](#setting-deadlines-for-a-single-request)
50+
- [Setting Metadata Headers](#setting-metadata-headers)
51+
- [Helper Methods](#helper-methods)
52+
- [Delete multiple edges](#delete-multiple-edges)
53+
- [Closing the DB Connection](#closing-the-db-connection)
54+
- [Using the Asynchronous Client](#using-the-asynchronous-client)
55+
- [Checking the request latency](#checking-the-request-latency)
56+
- [Development](#development)
57+
- [Building the source](#building-the-source)
58+
- [Code Style](#code-style)
59+
- [Running unit tests](#running-unit-tests)
4760
* [Using the Asynchronous Client](#using-the-asynchronous-client)
4861
* [Checking the request latency](#checking-the-request-latency)
4962
- [Development](#development)
@@ -58,71 +71,76 @@ grab via Maven:
5871
<dependency>
5972
<groupId>io.dgraph</groupId>
6073
<artifactId>dgraph4j</artifactId>
61-
<version>24.1.0</version>
74+
<version>24.1.1</version>
6275
</dependency>
6376
```
77+
6478
or Gradle:
6579
```groovy
66-
compile 'io.dgraph:dgraph4j:24.1.0'
80+
compile 'io.dgraph:dgraph4j:24.1.1'
6781
```
6882

6983
## Supported Versions
7084

7185
Depending on the version of Dgraph that you are connecting to, you will have to
7286
use a different version of this client.
7387

74-
| Dgraph version | dgraph4j version | java version |
75-
|:--------------:|:-----------------:|:------------:|
76-
| 1.0.X | 1.X.X | 1.9.X |
77-
| 1.1.0 - 2.X.X | 2.X.X | 1.9.X |
78-
|20.03.X-20.07.X | 20.03.X | 1.9.X |
79-
| 20.11.X | 20.11.X | 1.9.X |
80-
| >= 21.XX.X | 21.XX.X | 1.9.X |
81-
| >= 24.X.X | 24.X.X | 11 |
88+
| Dgraph version | dgraph4j version | java version |
89+
| :-------------: | :--------------: | :----------: |
90+
| 1.0.X | 1.X.X | 1.9.X |
91+
| 1.1.0 - 2.X.X | 2.X.X | 1.9.X |
92+
| 20.03.X-20.07.X | 20.03.X | 1.9.X |
93+
| 20.11.X | 20.11.X | 1.9.X |
94+
| >= 21.XX.X | 21.XX.X | 1.9.X |
95+
| >= 24.X.X | 24.X.X | 11 |
8296

8397
#### Note regarding Java 1.8.x support:
84-
v24.0.0 features an upgraded protoc-protobuf dependency that requires an upgrade to JDK 11. This version is incompatible with Java 1.8 and and requires an upgrade to Java 11.
98+
v24.0.0 features an upgraded protoc-protobuf dependency that requires an upgrade to JDK 11.
99+
This version is incompatible with Java 1.8 and and requires an upgrade to Java 11.
85100

86-
The following is only applicable to dgraph4j versions < v24.X.X.
101+
The following is only applicable to dgraph4j versions < v24.X.X.
87102
* If you aren't using gRPC with TLS, then the above version table will work for you with Java
88103
1.8.x too.
89104
* If you're using gRPC with TLS on Java 1.8.x, then you will need to follow gRPC docs [here
90105
](https://github.com/grpc/grpc-java/blob/master/SECURITY.md#tls-on-non-android). Basically, it
91-
will require you to add the following dependency in your app with correct version for the
92-
corresponding `grpc-netty` version used by `dgraph4j`. You can find out the correct version of
106+
will require you to add the following dependency in your app with correct version for the
107+
corresponding `grpc-netty` version used by `dgraph4j`. You can find out the correct version of
93108
the dependency to use from the version combination table in [this section] in `grpc-netty` docs.
94-
109+
95110
For maven:
96-
111+
97112
```xml
98113
<dependency>
99114
<groupId>io.netty</groupId>
100115
<artifactId>netty-tcnative-boringssl-static</artifactId>
101116
<version><!-- See table in gRPC docs for correct version --></version>
102117
</dependency>
103118
```
104-
119+
105120
For Gradle:
106-
121+
107122
```groovy
108123
compile 'io.netty:netty-tcnative-boringssl-static:<See table in gRPC docs for correct version>'
109124
```
110-
111-
The following table lists the `grpc-netty` versions used by different `dgraph4j` versions over time, along with the supported versions of `netty-tcnative-boringssl-static` for the corresponding `grpc-netty` version:
112-
113-
| dgraph4j version | grpc-netty version | netty-tcnative-boringssl-static version |
114-
|:-----------------:|:------------------:|:---------------------------------------:|
115-
| 1.0.0-1.2.0 | 1.7.0 | 2.0.6.Final |
116-
| 1.4.0-1.6.0 | 1.10.0 | 2.0.7.Final |
117-
| 1.7.0 | 1.15.0 | 2.0.12.Final |
118-
| 1.7.3-1.7.5 | 1.15.1 | 2.0.12.Final |
119-
| 2.0.0-2.1.0 | 1.22.1 | 2.0.25.Final |
120-
| 20.03.0-20.03.3 | 1.26.0 | 2.0.26.Final |
121-
| >= 20.11.0 | 1.34.1 | 2.0.31.Final |
122-
| >= 24.0.0 | 1.65.1 | 4.1.100.Final |
123-
| >= 24.1.0 | 1.68.2 | 4.1.110.Final |
124-
125-
For example, when using `dgraph4j v24.0.0`, the version of the `netty-tcnative-boringssl-static` dependency to be used is `4.1.100.Final`, as suggested by gRPC docs for `grpc-netty v1.65.1`.
125+
126+
The following table lists the `grpc-netty` versions used by different `dgraph4j` versions
127+
over time, along with the supported versions of `netty-tcnative-boringssl-static`
128+
for the corresponding `grpc-netty` version:
129+
130+
| dgraph4j version | grpc-netty version | netty-tcnative-boringssl-static version |
131+
| :--------------: | :----------------: | :-------------------------------------: |
132+
| 1.0.0-1.2.0 | 1.7.0 | 2.0.6.Final |
133+
| 1.4.0-1.6.0 | 1.10.0 | 2.0.7.Final |
134+
| 1.7.0 | 1.15.0 | 2.0.12.Final |
135+
| 1.7.3-1.7.5 | 1.15.1 | 2.0.12.Final |
136+
| 2.0.0-2.1.0 | 1.22.1 | 2.0.25.Final |
137+
| 20.03.0-20.03.3 | 1.26.0 | 2.0.26.Final |
138+
| >= 20.11.0 | 1.34.1 | 2.0.31.Final |
139+
| >= 24.0.0 | 1.65.1 | 4.1.100.Final |
140+
| >= 24.1.1 | 1.68.2 | 4.1.110.Final |
141+
142+
For example, when using `dgraph4j v24.0.0`, the version of the `netty-tcnative-boringssl-static`
143+
dependency to be used is `4.1.100.Final`, as suggested by gRPC docs for `grpc-netty v1.65.1`.
126144

127145
[this section]: https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty
128146

@@ -457,7 +475,7 @@ txn.doRequest(request);
457475

458476
### Running a Query with RDF response
459477

460-
You can get query results as an RDF response by calling either `queryRDF()` or `queryRDFWithVars()`.
478+
You can get query results as an RDF response by calling either `queryRDF()` or `queryRDFWithVars()`.
461479
The response contains the `getRdf()` method, which will provide the RDF encoded output.
462480

463481
**Note**: If you are querying for `uid` values only, use a JSON format response
@@ -505,8 +523,9 @@ txn.doRequest(request);
505523

506524
### Running a Conditional Upsert
507525

508-
The upsert block also allows specifying a conditional mutation block using an `@if` directive. The mutation is executed
509-
only when the specified condition is true. If the condition is false, the mutation is silently ignored.
526+
The upsert block also allows specifying a conditional mutation block using an `@if` directive.
527+
The mutation is executed only when the specified condition is true. If the condition is false,
528+
the mutation is silently ignored.
510529

511530
See more about Conditional Upsert [Here](https://docs.dgraph.io/mutations/#conditional-upsert).
512531

@@ -625,7 +644,7 @@ Here is the asynchronous version of the code above, which runs a query.
625644

626645
```java
627646
// Query
628-
String query =
647+
String query =
629648
"query all($a: string){\n" +
630649
" all(func: eq(name, $a)) {\n" +
631650
" name\n" +

0 commit comments

Comments
 (0)