Skip to content

Commit 200c372

Browse files
Merge pull request #168 from dgraph-io/anurags92/release21.03Update
chore: release v21.03.0
2 parents 6e9ed3f + bac557f commit 200c372

File tree

6 files changed

+77
-50
lines changed

6 files changed

+77
-50
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99
===================
1010

11+
## [v21.03.0] - 2020-04-09
12+
13+
### Added
14+
- Logging in to namespace
15+
- Add response type
16+
- Hash to response and txn context.
17+
- Deprecation messaged for Slash Endpoint [168]
18+
1119
## [v20.07.0] - 2020-09-18
1220

1321
### Added

pydgraph/client_stub.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def close(self):
8787
del self.channel
8888
del self.stub
8989

90+
# from_slash_endpoint is deprecated and will be removed in v21.07 release. For more details,
91+
# see: https://discuss.dgraph.io/t/regarding-slash-cloud-dgraph-endpoints-in-the-clients/13492
9092
@staticmethod
9193
def from_slash_endpoint(slash_end_point, api_key):
9294
"""Returns Dgraph Client stub for the Slash GraphQL endpoint"""

pydgraph/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
"""Metadata about this package."""
1616

17-
VERSION = '20.07.0'
17+
VERSION = '21.03.0'

pydgraph/proto/api.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ message Request {
5757
RDF = 1;
5858
}
5959
RespFormat resp_format = 14;
60+
string hash = 15;
6061
}
6162

6263
message Uids {
@@ -128,6 +129,7 @@ message TxnContext {
128129
bool aborted = 3;
129130
repeated string keys = 4; // List of keys to be used for conflict detection.
130131
repeated string preds = 5; // List of predicates involved in this transaction.
132+
string hash = 6;
131133
}
132134

133135
message Check {}

pydgraph/proto/api_pb2.py

Lines changed: 62 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydgraph/txn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def do_request(self, request, timeout=None, metadata=None, credentials=None):
9595
raise errors.TransactionError('Readonly transaction cannot run mutations')
9696
self._mutated = True
9797

98+
request.hash = self._ctx.hash
9899
new_metadata = self._dg.add_login_metadata(metadata)
99100
query_error = None
100101
try:
@@ -311,7 +312,7 @@ def merge_context(self, src=None):
311312
elif self._ctx.start_ts != src.start_ts:
312313
# This condition should never be true.
313314
raise errors.TransactionError('StartTs mismatch')
314-
315+
self._ctx.hash = src.hash
315316
self._ctx.keys.extend(src.keys)
316317
self._ctx.preds.extend(src.preds)
317318

0 commit comments

Comments
 (0)