Skip to content

Commit a1ed6eb

Browse files
authored
Upgrade dependencies, including googleapis and gcloud + code cleanup. (#8022)
1 parent 6f23465 commit a1ed6eb

File tree

14 files changed

+152
-194
lines changed

14 files changed

+152
-194
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Important changes to data models, configuration, and migrations between each
22
AppEngine version, listed here to ease deployment and troubleshooting.
33

44
## Next Release (replace with git tag when deployed)
5+
* Upgraded dependencies including `googleapis`.
56

67
## `20240905t122100-all`
78
* Bumped runtimeVersion to `2024.09.04`.

app/lib/task/cloudcompute/googlecloudcompute.dart

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'dart:io';
99
import 'package:clock/clock.dart';
1010
import 'package:gcloud/service_scope.dart' as ss;
1111
import 'package:googleapis/compute/v1.dart' hide Duration;
12+
import 'package:googleapis/compute/v1.dart' as compute_v1 show Duration;
1213
import 'package:http/http.dart' as http;
1314
import 'package:logging/logging.dart' show Logger;
1415
import 'package:meta/meta.dart';
@@ -456,13 +457,15 @@ runcmd:
456457
name: instanceName,
457458
description: description,
458459
machineType: 'zones/$zone/machineTypes/$_machineType',
459-
scheduling: _Scheduling(
460+
scheduling: Scheduling(
460461
preemptible: true,
461462
automaticRestart: false,
462463
onHostMaintenance: 'TERMINATE',
463464
instanceTerminationAction: 'DELETE',
464465
provisioningModel: 'SPOT',
465-
maxRunDuration: _maxRunDuration,
466+
maxRunDuration: compute_v1.Duration(
467+
seconds: _maxRunDuration.inSeconds.toString(),
468+
),
466469
),
467470
labels: {
468471
// Labels that allows us to filter instances when listing instances.
@@ -774,49 +777,3 @@ DateTime _parseInstanceCreationTimestamp(String? timestamp) {
774777
return DateTime(0);
775778
}
776779
}
777-
778-
/// Extend [Scheduling] with support for [maxRunDuration].
779-
///
780-
/// This is only available in the Compute Beta API, but extremely useful for
781-
/// our use case, because GCE will then automatically delete instances.
782-
///
783-
/// The [maxRunDuration] property is encoded as:
784-
/// ```
785-
/// "maxRunDuration": {
786-
/// "seconds": string,
787-
/// "nanos": integer
788-
/// },
789-
/// ```
790-
/// For details, see reference documentation:
791-
/// https://cloud.google.com/compute/docs/reference/rest/beta/instances/insert
792-
class _Scheduling extends Scheduling {
793-
/// Specifies the max run duration for the given instance.
794-
///
795-
/// If specified, the instance termination action will be performed at the
796-
/// end of the run duration.
797-
Duration? maxRunDuration;
798-
799-
_Scheduling({
800-
super.automaticRestart,
801-
super.instanceTerminationAction,
802-
super.locationHint, // ignore: unused_element
803-
super.minNodeCpus, // ignore: unused_element
804-
super.nodeAffinities, // ignore: unused_element
805-
super.onHostMaintenance,
806-
super.preemptible,
807-
super.provisioningModel,
808-
this.maxRunDuration,
809-
});
810-
811-
@override
812-
Map<String, dynamic> toJson() {
813-
final maxRunDuration_ = maxRunDuration;
814-
return <String, dynamic>{
815-
...super.toJson(),
816-
if (maxRunDuration_ != null)
817-
'maxRunDuration': <String, dynamic>{
818-
'seconds': '${maxRunDuration_.inSeconds}',
819-
},
820-
};
821-
}
822-
}

app/pubspec.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,18 @@ packages:
239239
dependency: "direct dev"
240240
description:
241241
name: coverage
242-
sha256: "576aaab8b1abdd452e0f656c3e73da9ead9d7880e15bdc494189d9c1a1baf0db"
242+
sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5
243243
url: "https://pub.dev"
244244
source: hosted
245-
version: "1.9.0"
245+
version: "1.9.2"
246246
crypto:
247247
dependency: "direct main"
248248
description:
249249
name: crypto
250-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
250+
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
251251
url: "https://pub.dev"
252252
source: hosted
253-
version: "3.0.3"
253+
version: "3.0.5"
254254
csslib:
255255
dependency: transitive
256256
description:
@@ -310,10 +310,10 @@ packages:
310310
dependency: "direct main"
311311
description:
312312
name: gcloud
313-
sha256: e9501083036d5f94027ce5afddd8ddae9b04121cf2fc6036b2cdd5663b52fca7
313+
sha256: b8fbff52ff1cfdb2bb3c53eb039c0ee3745618632969b60ec25d55b31fbb36dd
314314
url: "https://pub.dev"
315315
source: hosted
316-
version: "0.8.12"
316+
version: "0.8.13"
317317
glob:
318318
dependency: transitive
319319
description:
@@ -334,10 +334,10 @@ packages:
334334
dependency: "direct main"
335335
description:
336336
name: googleapis
337-
sha256: "8a8c311723162af077ca73f94b823b97ff68770d966e29614d20baca9fdb490a"
337+
sha256: "864f222aed3f2ff00b816c675edf00a39e2aaf373d728d8abec30b37bee1a81c"
338338
url: "https://pub.dev"
339339
source: hosted
340-
version: "12.0.0"
340+
version: "13.2.0"
341341
googleapis_auth:
342342
dependency: "direct main"
343343
description:
@@ -525,10 +525,10 @@ packages:
525525
dependency: "direct main"
526526
description:
527527
name: mime
528-
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
528+
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
529529
url: "https://pub.dev"
530530
source: hosted
531-
version: "1.0.5"
531+
version: "1.0.6"
532532
neat_cache:
533533
dependency: "direct main"
534534
description:
@@ -732,10 +732,10 @@ packages:
732732
dependency: transitive
733733
description:
734734
name: source_map_stack_trace
735-
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
735+
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
736736
url: "https://pub.dev"
737737
source: hosted
738-
version: "2.1.1"
738+
version: "2.1.2"
739739
source_maps:
740740
dependency: transitive
741741
description:
@@ -860,18 +860,18 @@ packages:
860860
dependency: transitive
861861
description:
862862
name: uuid
863-
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
863+
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
864864
url: "https://pub.dev"
865865
source: hosted
866-
version: "4.4.2"
866+
version: "4.5.0"
867867
vm_service:
868868
dependency: transitive
869869
description:
870870
name: vm_service
871-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
871+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
872872
url: "https://pub.dev"
873873
source: hosted
874-
version: "14.2.4"
874+
version: "14.2.5"
875875
watcher:
876876
dependency: "direct main"
877877
description:

app/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ dependencies:
1818
fake_async: ^1.2.0
1919
fake_gcloud:
2020
path: ../pkg/fake_gcloud
21-
gcloud: '^0.8.11'
22-
googleapis: ^12.0.0
21+
gcloud: '^0.8.13'
22+
googleapis: ^13.0.0
2323
googleapis_auth: ^1.1.0
2424
html: ^0.15.0
2525
http: ^1.0.0

pkg/_popularity/pubspec.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,18 @@ packages:
154154
dependency: "direct dev"
155155
description:
156156
name: coverage
157-
sha256: "576aaab8b1abdd452e0f656c3e73da9ead9d7880e15bdc494189d9c1a1baf0db"
157+
sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5
158158
url: "https://pub.dev"
159159
source: hosted
160-
version: "1.9.0"
160+
version: "1.9.2"
161161
crypto:
162162
dependency: transitive
163163
description:
164164
name: crypto
165-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
165+
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
166166
url: "https://pub.dev"
167167
source: hosted
168-
version: "3.0.3"
168+
version: "3.0.5"
169169
dart_style:
170170
dependency: transitive
171171
description:
@@ -298,10 +298,10 @@ packages:
298298
dependency: transitive
299299
description:
300300
name: mime
301-
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
301+
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
302302
url: "https://pub.dev"
303303
source: hosted
304-
version: "1.0.5"
304+
version: "1.0.6"
305305
node_preamble:
306306
dependency: transitive
307307
description:
@@ -402,10 +402,10 @@ packages:
402402
dependency: transitive
403403
description:
404404
name: source_map_stack_trace
405-
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
405+
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
406406
url: "https://pub.dev"
407407
source: hosted
408-
version: "2.1.1"
408+
version: "2.1.2"
409409
source_maps:
410410
dependency: transitive
411411
description:
@@ -506,10 +506,10 @@ packages:
506506
dependency: transitive
507507
description:
508508
name: vm_service
509-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
509+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
510510
url: "https://pub.dev"
511511
source: hosted
512-
version: "14.2.4"
512+
version: "14.2.5"
513513
watcher:
514514
dependency: transitive
515515
description:

pkg/_pub_shared/pubspec.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,18 @@ packages:
169169
dependency: "direct dev"
170170
description:
171171
name: coverage
172-
sha256: "576aaab8b1abdd452e0f656c3e73da9ead9d7880e15bdc494189d9c1a1baf0db"
172+
sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5
173173
url: "https://pub.dev"
174174
source: hosted
175-
version: "1.9.0"
175+
version: "1.9.2"
176176
crypto:
177177
dependency: transitive
178178
description:
179179
name: crypto
180-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
180+
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
181181
url: "https://pub.dev"
182182
source: hosted
183-
version: "3.0.3"
183+
version: "3.0.5"
184184
csslib:
185185
dependency: transitive
186186
description:
@@ -345,10 +345,10 @@ packages:
345345
dependency: transitive
346346
description:
347347
name: mime
348-
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
348+
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
349349
url: "https://pub.dev"
350350
source: hosted
351-
version: "1.0.5"
351+
version: "1.0.6"
352352
node_preamble:
353353
dependency: transitive
354354
description:
@@ -465,10 +465,10 @@ packages:
465465
dependency: transitive
466466
description:
467467
name: source_map_stack_trace
468-
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
468+
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
469469
url: "https://pub.dev"
470470
source: hosted
471-
version: "2.1.1"
471+
version: "2.1.2"
472472
source_maps:
473473
dependency: transitive
474474
description:
@@ -577,18 +577,18 @@ packages:
577577
dependency: transitive
578578
description:
579579
name: uuid
580-
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
580+
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
581581
url: "https://pub.dev"
582582
source: hosted
583-
version: "4.4.2"
583+
version: "4.5.0"
584584
vm_service:
585585
dependency: transitive
586586
description:
587587
name: vm_service
588-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
588+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
589589
url: "https://pub.dev"
590590
source: hosted
591-
version: "14.2.4"
591+
version: "14.2.5"
592592
watcher:
593593
dependency: transitive
594594
description:

pkg/api_builder/pubspec.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,18 @@ packages:
154154
dependency: transitive
155155
description:
156156
name: coverage
157-
sha256: "576aaab8b1abdd452e0f656c3e73da9ead9d7880e15bdc494189d9c1a1baf0db"
157+
sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5
158158
url: "https://pub.dev"
159159
source: hosted
160-
version: "1.9.0"
160+
version: "1.9.2"
161161
crypto:
162162
dependency: transitive
163163
description:
164164
name: crypto
165-
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
165+
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
166166
url: "https://pub.dev"
167167
source: hosted
168-
version: "3.0.3"
168+
version: "3.0.5"
169169
dart_style:
170170
dependency: transitive
171171
description:
@@ -306,10 +306,10 @@ packages:
306306
dependency: transitive
307307
description:
308308
name: mime
309-
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
309+
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
310310
url: "https://pub.dev"
311311
source: hosted
312-
version: "1.0.5"
312+
version: "1.0.6"
313313
node_preamble:
314314
dependency: transitive
315315
description:
@@ -410,10 +410,10 @@ packages:
410410
dependency: transitive
411411
description:
412412
name: source_map_stack_trace
413-
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
413+
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
414414
url: "https://pub.dev"
415415
source: hosted
416-
version: "2.1.1"
416+
version: "2.1.2"
417417
source_maps:
418418
dependency: transitive
419419
description:
@@ -522,18 +522,18 @@ packages:
522522
dependency: "direct main"
523523
description:
524524
name: uuid
525-
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
525+
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
526526
url: "https://pub.dev"
527527
source: hosted
528-
version: "4.4.2"
528+
version: "4.5.0"
529529
vm_service:
530530
dependency: transitive
531531
description:
532532
name: vm_service
533-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
533+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
534534
url: "https://pub.dev"
535535
source: hosted
536-
version: "14.2.4"
536+
version: "14.2.5"
537537
watcher:
538538
dependency: transitive
539539
description:

0 commit comments

Comments
 (0)