Skip to content

Commit

Permalink
Merge pull request #168 from dgraph-io/anurags92/release21.03Update
Browse files Browse the repository at this point in the history
chore: release v21.03.0
  • Loading branch information
all-seeing-code authored Apr 9, 2021
2 parents 6e9ed3f + bac557f commit 200c372
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 50 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
===================

## [v21.03.0] - 2020-04-09

### Added
- Logging in to namespace
- Add response type
- Hash to response and txn context.
- Deprecation messaged for Slash Endpoint [168]

## [v20.07.0] - 2020-09-18

### Added
Expand Down
2 changes: 2 additions & 0 deletions pydgraph/client_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def close(self):
del self.channel
del self.stub

# from_slash_endpoint is deprecated and will be removed in v21.07 release. For more details,
# see: https://discuss.dgraph.io/t/regarding-slash-cloud-dgraph-endpoints-in-the-clients/13492
@staticmethod
def from_slash_endpoint(slash_end_point, api_key):
"""Returns Dgraph Client stub for the Slash GraphQL endpoint"""
Expand Down
2 changes: 1 addition & 1 deletion pydgraph/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Metadata about this package."""

VERSION = '20.07.0'
VERSION = '21.03.0'
2 changes: 2 additions & 0 deletions pydgraph/proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ message Request {
RDF = 1;
}
RespFormat resp_format = 14;
string hash = 15;
}

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

message Check {}
Expand Down
110 changes: 62 additions & 48 deletions pydgraph/proto/api_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pydgraph/txn.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def do_request(self, request, timeout=None, metadata=None, credentials=None):
raise errors.TransactionError('Readonly transaction cannot run mutations')
self._mutated = True

request.hash = self._ctx.hash
new_metadata = self._dg.add_login_metadata(metadata)
query_error = None
try:
Expand Down Expand Up @@ -311,7 +312,7 @@ def merge_context(self, src=None):
elif self._ctx.start_ts != src.start_ts:
# This condition should never be true.
raise errors.TransactionError('StartTs mismatch')

self._ctx.hash = src.hash
self._ctx.keys.extend(src.keys)
self._ctx.preds.extend(src.preds)

Expand Down

0 comments on commit 200c372

Please sign in to comment.