Skip to content

Commit 92a4ac6

Browse files
authored
Prepare 0.13.6 with retries for datastore (dart-archive/appengine#167)
1 parent 47c2fb4 commit 92a4ac6

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

pkgs/appengine/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.13.6-wip
22

33
* Require Dart 2.19.
4+
* Setup `dbService` to do retries for failed requests.
45

56
## 0.13.5
67

pkgs/appengine/lib/src/appengine_internal.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,13 @@ Future<db.DatastoreDB> _obtainDatastoreService(
226226
grpc_datastore_impl.OAuth2Scopes,
227227
);
228228
final grpcClient = _getGrpcClientChannel(endpoint, needAuthorization);
229-
final rawDatastore = grpc_datastore_impl.GrpcDatastoreImpl(
230-
grpcClient, authenticator, projectId);
229+
final rawDatastore = datastore.Datastore.withRetry(
230+
grpc_datastore_impl.GrpcDatastoreImpl(
231+
grpcClient,
232+
authenticator,
233+
projectId,
234+
),
235+
);
231236
return db.DatastoreDB(rawDatastore, modelDB: db.ModelDBImpl());
232237
}
233238

@@ -329,7 +334,8 @@ class _ClientChannelWithClientId implements grpc.ClientChannel {
329334
Future<void> terminate() => _clientChannel.terminate();
330335

331336
@override
332-
Stream<ConnectionState> get onConnectionStateChanged => _clientChannel.onConnectionStateChanged;
337+
Stream<ConnectionState> get onConnectionStateChanged =>
338+
_clientChannel.onConnectionStateChanged;
333339
}
334340

335341
Future<String?> _getZoneInProduction() => _getMetadataValue('zone');

pkgs/appengine/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: appengine
2-
version: 0.13.6-wip
2+
version: 0.13.6
33
description: >
44
Support for using Dart as a custom runtime on Google App Engine Flexible
55
Environment
@@ -14,7 +14,7 @@ environment:
1414

1515
dependencies:
1616
fixnum: ^1.0.0
17-
gcloud: ^0.8.0
17+
gcloud: ^0.8.10
1818
googleapis_auth: ^1.1.0
1919
grpc: ^3.1.0
2020
http: ^0.13.3

0 commit comments

Comments
 (0)