@temporalio/core-bridge 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Cargo.lock CHANGED
@@ -33,9 +33,9 @@ dependencies = [
33
33
 
34
34
  [[package]]
35
35
  name = "anyhow"
36
- version = "1.0.53"
36
+ version = "1.0.56"
37
37
  source = "registry+https://github.com/rust-lang/crates.io-index"
38
- checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
38
+ checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27"
39
39
 
40
40
  [[package]]
41
41
  name = "arc-swap"
@@ -45,9 +45,9 @@ checksum = "c5d78ce20460b82d3fa150275ed9d55e21064fc7951177baacf86a145c4a4b1f"
45
45
 
46
46
  [[package]]
47
47
  name = "async-stream"
48
- version = "0.3.2"
48
+ version = "0.3.3"
49
49
  source = "registry+https://github.com/rust-lang/crates.io-index"
50
- checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625"
50
+ checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e"
51
51
  dependencies = [
52
52
  "async-stream-impl",
53
53
  "futures-core",
@@ -55,9 +55,9 @@ dependencies = [
55
55
 
56
56
  [[package]]
57
57
  name = "async-stream-impl"
58
- version = "0.3.2"
58
+ version = "0.3.3"
59
59
  source = "registry+https://github.com/rust-lang/crates.io-index"
60
- checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
60
+ checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
61
61
  dependencies = [
62
62
  "proc-macro2",
63
63
  "quote",
@@ -66,9 +66,9 @@ dependencies = [
66
66
 
67
67
  [[package]]
68
68
  name = "async-trait"
69
- version = "0.1.52"
69
+ version = "0.1.53"
70
70
  source = "registry+https://github.com/rust-lang/crates.io-index"
71
- checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"
71
+ checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"
72
72
  dependencies = [
73
73
  "proc-macro2",
74
74
  "quote",
@@ -124,9 +124,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
124
124
 
125
125
  [[package]]
126
126
  name = "cc"
127
- version = "1.0.72"
127
+ version = "1.0.73"
128
128
  source = "registry+https://github.com/rust-lang/crates.io-index"
129
- checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
129
+ checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
130
130
 
131
131
  [[package]]
132
132
  name = "cfg-if"
@@ -172,9 +172,9 @@ dependencies = [
172
172
 
173
173
  [[package]]
174
174
  name = "crossbeam-channel"
175
- version = "0.5.2"
175
+ version = "0.5.4"
176
176
  source = "registry+https://github.com/rust-lang/crates.io-index"
177
- checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
177
+ checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
178
178
  dependencies = [
179
179
  "cfg-if",
180
180
  "crossbeam-utils",
@@ -193,10 +193,11 @@ dependencies = [
193
193
 
194
194
  [[package]]
195
195
  name = "crossbeam-epoch"
196
- version = "0.9.7"
196
+ version = "0.9.8"
197
197
  source = "registry+https://github.com/rust-lang/crates.io-index"
198
- checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"
198
+ checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"
199
199
  dependencies = [
200
+ "autocfg",
200
201
  "cfg-if",
201
202
  "crossbeam-utils",
202
203
  "lazy_static",
@@ -206,9 +207,9 @@ dependencies = [
206
207
 
207
208
  [[package]]
208
209
  name = "crossbeam-queue"
209
- version = "0.3.4"
210
+ version = "0.3.5"
210
211
  source = "registry+https://github.com/rust-lang/crates.io-index"
211
- checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce"
212
+ checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2"
212
213
  dependencies = [
213
214
  "cfg-if",
214
215
  "crossbeam-utils",
@@ -216,9 +217,9 @@ dependencies = [
216
217
 
217
218
  [[package]]
218
219
  name = "crossbeam-utils"
219
- version = "0.8.7"
220
+ version = "0.8.8"
220
221
  source = "registry+https://github.com/rust-lang/crates.io-index"
221
- checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
222
+ checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
222
223
  dependencies = [
223
224
  "cfg-if",
224
225
  "lazy_static",
@@ -232,9 +233,9 @@ checksum = "697c714f50560202b1f4e2e09cd50a421881c83e9025db75d15f276616f04f40"
232
233
 
233
234
  [[package]]
234
235
  name = "darling"
235
- version = "0.12.4"
236
+ version = "0.14.0"
236
237
  source = "registry+https://github.com/rust-lang/crates.io-index"
237
- checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c"
238
+ checksum = "f1a5d2e8b5a94b2261efb20e99a01255b9c5293797d69bbf04600567b2f9b8d7"
238
239
  dependencies = [
239
240
  "darling_core",
240
241
  "darling_macro",
@@ -242,9 +243,9 @@ dependencies = [
242
243
 
243
244
  [[package]]
244
245
  name = "darling_core"
245
- version = "0.12.4"
246
+ version = "0.14.0"
246
247
  source = "registry+https://github.com/rust-lang/crates.io-index"
247
- checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36"
248
+ checksum = "8f1c7d56716be82d9c6adb967cfe700955179ea88806e898483dad6987330a54"
248
249
  dependencies = [
249
250
  "fnv",
250
251
  "ident_case",
@@ -256,9 +257,9 @@ dependencies = [
256
257
 
257
258
  [[package]]
258
259
  name = "darling_macro"
259
- version = "0.12.4"
260
+ version = "0.14.0"
260
261
  source = "registry+https://github.com/rust-lang/crates.io-index"
261
- checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a"
262
+ checksum = "64dd7e5a75a00cb6799ae9fbbfc3bba0134def6579a9e27564e72c839c837bed"
262
263
  dependencies = [
263
264
  "darling_core",
264
265
  "quote",
@@ -277,9 +278,9 @@ dependencies = [
277
278
 
278
279
  [[package]]
279
280
  name = "dashmap"
280
- version = "5.1.0"
281
+ version = "5.2.0"
281
282
  source = "registry+https://github.com/rust-lang/crates.io-index"
282
- checksum = "c0834a35a3fce649144119e18da2a4d8ed12ef3862f47183fd46f625d072d96c"
283
+ checksum = "4c8858831f7781322e539ea39e72449c46b059638250c14344fec8d0aa6e539c"
283
284
  dependencies = [
284
285
  "cfg-if",
285
286
  "num_cpus",
@@ -288,18 +289,18 @@ dependencies = [
288
289
 
289
290
  [[package]]
290
291
  name = "derive_builder"
291
- version = "0.11.1"
292
+ version = "0.11.2"
292
293
  source = "registry+https://github.com/rust-lang/crates.io-index"
293
- checksum = "11d918e7dabe374a51dae0f29d818fece3b218b8b4eabec3bc4d42c537e7ed8f"
294
+ checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
294
295
  dependencies = [
295
296
  "derive_builder_macro",
296
297
  ]
297
298
 
298
299
  [[package]]
299
300
  name = "derive_builder_core"
300
- version = "0.11.1"
301
+ version = "0.11.2"
301
302
  source = "registry+https://github.com/rust-lang/crates.io-index"
302
- checksum = "f712c2d4e52d5fcae53584e461dcb92fb2202e144ebf83ab0ba4360d18b767c7"
303
+ checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
303
304
  dependencies = [
304
305
  "darling",
305
306
  "proc-macro2",
@@ -309,9 +310,9 @@ dependencies = [
309
310
 
310
311
  [[package]]
311
312
  name = "derive_builder_macro"
312
- version = "0.11.1"
313
+ version = "0.11.2"
313
314
  source = "registry+https://github.com/rust-lang/crates.io-index"
314
- checksum = "a8a2ac71b4a9a590dde6cee3ca4687aca5e7ce06f4ee297c5a959de5f1e42b2e"
315
+ checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
315
316
  dependencies = [
316
317
  "derive_builder_core",
317
318
  "syn",
@@ -402,9 +403,9 @@ dependencies = [
402
403
 
403
404
  [[package]]
404
405
  name = "fragile"
405
- version = "1.1.0"
406
+ version = "1.2.0"
406
407
  source = "registry+https://github.com/rust-lang/crates.io-index"
407
- checksum = "8da1b8f89c5b5a5b7e59405cfcf0bb9588e5ed19f0b57a4cd542bbba3f164a6d"
408
+ checksum = "e9d758e60b45e8d749c89c1b389ad8aee550f86aa12e2b9298b546dda7a82ab1"
408
409
 
409
410
  [[package]]
410
411
  name = "futures"
@@ -508,20 +509,20 @@ dependencies = [
508
509
 
509
510
  [[package]]
510
511
  name = "getrandom"
511
- version = "0.2.4"
512
+ version = "0.2.6"
512
513
  source = "registry+https://github.com/rust-lang/crates.io-index"
513
- checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
514
+ checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
514
515
  dependencies = [
515
516
  "cfg-if",
516
517
  "libc",
517
- "wasi",
518
+ "wasi 0.10.2+wasi-snapshot-preview1",
518
519
  ]
519
520
 
520
521
  [[package]]
521
522
  name = "h2"
522
- version = "0.3.11"
523
+ version = "0.3.13"
523
524
  source = "registry+https://github.com/rust-lang/crates.io-index"
524
- checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
525
+ checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
525
526
  dependencies = [
526
527
  "bytes",
527
528
  "fnv",
@@ -532,7 +533,7 @@ dependencies = [
532
533
  "indexmap",
533
534
  "slab",
534
535
  "tokio",
535
- "tokio-util 0.6.9",
536
+ "tokio-util 0.7.1",
536
537
  "tracing",
537
538
  ]
538
539
 
@@ -587,9 +588,9 @@ dependencies = [
587
588
 
588
589
  [[package]]
589
590
  name = "httparse"
590
- version = "1.6.0"
591
+ version = "1.7.0"
591
592
  source = "registry+https://github.com/rust-lang/crates.io-index"
592
- checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4"
593
+ checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba"
593
594
 
594
595
  [[package]]
595
596
  name = "httpdate"
@@ -599,9 +600,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
599
600
 
600
601
  [[package]]
601
602
  name = "hyper"
602
- version = "0.14.17"
603
+ version = "0.14.18"
603
604
  source = "registry+https://github.com/rust-lang/crates.io-index"
604
- checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd"
605
+ checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
605
606
  dependencies = [
606
607
  "bytes",
607
608
  "futures-channel",
@@ -652,9 +653,9 @@ dependencies = [
652
653
 
653
654
  [[package]]
654
655
  name = "indexmap"
655
- version = "1.8.0"
656
+ version = "1.8.1"
656
657
  source = "registry+https://github.com/rust-lang/crates.io-index"
657
- checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
658
+ checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
658
659
  dependencies = [
659
660
  "autocfg",
660
661
  "hashbrown",
@@ -686,9 +687,9 @@ checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
686
687
 
687
688
  [[package]]
688
689
  name = "js-sys"
689
- version = "0.3.56"
690
+ version = "0.3.57"
690
691
  source = "registry+https://github.com/rust-lang/crates.io-index"
691
- checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04"
692
+ checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397"
692
693
  dependencies = [
693
694
  "wasm-bindgen",
694
695
  ]
@@ -701,9 +702,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
701
702
 
702
703
  [[package]]
703
704
  name = "libc"
704
- version = "0.2.118"
705
+ version = "0.2.124"
705
706
  source = "registry+https://github.com/rust-lang/crates.io-index"
706
- checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94"
707
+ checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"
707
708
 
708
709
  [[package]]
709
710
  name = "libloading"
@@ -717,27 +718,28 @@ dependencies = [
717
718
 
718
719
  [[package]]
719
720
  name = "lock_api"
720
- version = "0.4.6"
721
+ version = "0.4.7"
721
722
  source = "registry+https://github.com/rust-lang/crates.io-index"
722
- checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
723
+ checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
723
724
  dependencies = [
725
+ "autocfg",
724
726
  "scopeguard",
725
727
  ]
726
728
 
727
729
  [[package]]
728
730
  name = "log"
729
- version = "0.4.14"
731
+ version = "0.4.16"
730
732
  source = "registry+https://github.com/rust-lang/crates.io-index"
731
- checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
733
+ checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
732
734
  dependencies = [
733
735
  "cfg-if",
734
736
  ]
735
737
 
736
738
  [[package]]
737
739
  name = "lru"
738
- version = "0.7.2"
740
+ version = "0.7.5"
739
741
  source = "registry+https://github.com/rust-lang/crates.io-index"
740
- checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f"
742
+ checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889"
741
743
  dependencies = [
742
744
  "hashbrown",
743
745
  ]
@@ -774,14 +776,15 @@ dependencies = [
774
776
 
775
777
  [[package]]
776
778
  name = "mio"
777
- version = "0.7.14"
779
+ version = "0.8.2"
778
780
  source = "registry+https://github.com/rust-lang/crates.io-index"
779
- checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
781
+ checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
780
782
  dependencies = [
781
783
  "libc",
782
784
  "log",
783
785
  "miow",
784
786
  "ntapi",
787
+ "wasi 0.11.0+wasi-snapshot-preview1",
785
788
  "winapi",
786
789
  ]
787
790
 
@@ -904,9 +907,9 @@ dependencies = [
904
907
 
905
908
  [[package]]
906
909
  name = "once_cell"
907
- version = "1.9.0"
910
+ version = "1.10.0"
908
911
  source = "registry+https://github.com/rust-lang/crates.io-index"
909
- checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
912
+ checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
910
913
 
911
914
  [[package]]
912
915
  name = "openssl-probe"
@@ -1001,7 +1004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1001
1004
  checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
1002
1005
  dependencies = [
1003
1006
  "lock_api",
1004
- "parking_lot_core 0.9.1",
1007
+ "parking_lot_core 0.9.2",
1005
1008
  ]
1006
1009
 
1007
1010
  [[package]]
@@ -1020,9 +1023,9 @@ dependencies = [
1020
1023
 
1021
1024
  [[package]]
1022
1025
  name = "parking_lot_core"
1023
- version = "0.9.1"
1026
+ version = "0.9.2"
1024
1027
  source = "registry+https://github.com/rust-lang/crates.io-index"
1025
- checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
1028
+ checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37"
1026
1029
  dependencies = [
1027
1030
  "cfg-if",
1028
1031
  "libc",
@@ -1117,9 +1120,9 @@ dependencies = [
1117
1120
 
1118
1121
  [[package]]
1119
1122
  name = "proc-macro2"
1120
- version = "1.0.36"
1123
+ version = "1.0.37"
1121
1124
  source = "registry+https://github.com/rust-lang/crates.io-index"
1122
- checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
1125
+ checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
1123
1126
  dependencies = [
1124
1127
  "unicode-xid",
1125
1128
  ]
@@ -1200,9 +1203,9 @@ checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96"
1200
1203
 
1201
1204
  [[package]]
1202
1205
  name = "quote"
1203
- version = "1.0.15"
1206
+ version = "1.0.18"
1204
1207
  source = "registry+https://github.com/rust-lang/crates.io-index"
1205
- checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
1208
+ checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
1206
1209
  dependencies = [
1207
1210
  "proc-macro2",
1208
1211
  ]
@@ -1239,18 +1242,18 @@ dependencies = [
1239
1242
 
1240
1243
  [[package]]
1241
1244
  name = "redox_syscall"
1242
- version = "0.2.10"
1245
+ version = "0.2.13"
1243
1246
  source = "registry+https://github.com/rust-lang/crates.io-index"
1244
- checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
1247
+ checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
1245
1248
  dependencies = [
1246
1249
  "bitflags",
1247
1250
  ]
1248
1251
 
1249
1252
  [[package]]
1250
1253
  name = "regex"
1251
- version = "1.5.4"
1254
+ version = "1.5.5"
1252
1255
  source = "registry+https://github.com/rust-lang/crates.io-index"
1253
- checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
1256
+ checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
1254
1257
  dependencies = [
1255
1258
  "aho-corasick",
1256
1259
  "memchr",
@@ -1298,9 +1301,9 @@ dependencies = [
1298
1301
 
1299
1302
  [[package]]
1300
1303
  name = "ringbuf"
1301
- version = "0.2.6"
1304
+ version = "0.2.8"
1302
1305
  source = "registry+https://github.com/rust-lang/crates.io-index"
1303
- checksum = "6c60f3923939c33e6c543ddbff14d0ee6a407fcd186d560be37282559616adf3"
1306
+ checksum = "f65af18d50f789e74aaf23bbb3f65dcd22a3cb6e029b5bced149f6bd57c5c2a2"
1304
1307
  dependencies = [
1305
1308
  "cache-padded",
1306
1309
  ]
@@ -1311,7 +1314,7 @@ version = "0.4.0"
1311
1314
  source = "registry+https://github.com/rust-lang/crates.io-index"
1312
1315
  checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
1313
1316
  dependencies = [
1314
- "semver 1.0.5",
1317
+ "semver 1.0.7",
1315
1318
  ]
1316
1319
 
1317
1320
  [[package]]
@@ -1428,9 +1431,9 @@ dependencies = [
1428
1431
 
1429
1432
  [[package]]
1430
1433
  name = "semver"
1431
- version = "1.0.5"
1434
+ version = "1.0.7"
1432
1435
  source = "registry+https://github.com/rust-lang/crates.io-index"
1433
- checksum = "0486718e92ec9a68fbed73bb5ef687d71103b142595b406835649bebd33f72c7"
1436
+ checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4"
1434
1437
 
1435
1438
  [[package]]
1436
1439
  name = "semver-parser"
@@ -1495,9 +1498,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
1495
1498
 
1496
1499
  [[package]]
1497
1500
  name = "slab"
1498
- version = "0.4.5"
1501
+ version = "0.4.6"
1499
1502
  source = "registry+https://github.com/rust-lang/crates.io-index"
1500
- checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
1503
+ checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
1501
1504
 
1502
1505
  [[package]]
1503
1506
  name = "slotmap"
@@ -1538,9 +1541,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
1538
1541
 
1539
1542
  [[package]]
1540
1543
  name = "syn"
1541
- version = "1.0.86"
1544
+ version = "1.0.91"
1542
1545
  source = "registry+https://github.com/rust-lang/crates.io-index"
1543
- checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
1546
+ checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
1544
1547
  dependencies = [
1545
1548
  "proc-macro2",
1546
1549
  "quote",
@@ -1593,7 +1596,7 @@ dependencies = [
1593
1596
  "async-trait",
1594
1597
  "base64",
1595
1598
  "crossbeam",
1596
- "dashmap 5.1.0",
1599
+ "dashmap 5.2.0",
1597
1600
  "derive_builder",
1598
1601
  "derive_more",
1599
1602
  "enum_dispatch",
@@ -1625,7 +1628,7 @@ dependencies = [
1625
1628
  "thiserror",
1626
1629
  "tokio",
1627
1630
  "tokio-stream",
1628
- "tokio-util 0.7.0",
1631
+ "tokio-util 0.7.1",
1629
1632
  "tonic",
1630
1633
  "tonic-build",
1631
1634
  "tracing",
@@ -1738,9 +1741,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
1738
1741
 
1739
1742
  [[package]]
1740
1743
  name = "tokio"
1741
- version = "1.16.1"
1744
+ version = "1.17.0"
1742
1745
  source = "registry+https://github.com/rust-lang/crates.io-index"
1743
- checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a"
1746
+ checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
1744
1747
  dependencies = [
1745
1748
  "bytes",
1746
1749
  "libc",
@@ -1748,9 +1751,10 @@ dependencies = [
1748
1751
  "mio",
1749
1752
  "num_cpus",
1750
1753
  "once_cell",
1751
- "parking_lot 0.11.2",
1754
+ "parking_lot 0.12.0",
1752
1755
  "pin-project-lite",
1753
1756
  "signal-hook-registry",
1757
+ "socket2",
1754
1758
  "tokio-macros",
1755
1759
  "winapi",
1756
1760
  ]
@@ -1814,16 +1818,16 @@ dependencies = [
1814
1818
 
1815
1819
  [[package]]
1816
1820
  name = "tokio-util"
1817
- version = "0.7.0"
1821
+ version = "0.7.1"
1818
1822
  source = "registry+https://github.com/rust-lang/crates.io-index"
1819
- checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1"
1823
+ checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
1820
1824
  dependencies = [
1821
1825
  "bytes",
1822
1826
  "futures-core",
1823
1827
  "futures-sink",
1824
- "log",
1825
1828
  "pin-project-lite",
1826
1829
  "tokio",
1830
+ "tracing",
1827
1831
  ]
1828
1832
 
1829
1833
  [[package]]
@@ -1873,9 +1877,9 @@ dependencies = [
1873
1877
 
1874
1878
  [[package]]
1875
1879
  name = "tower"
1876
- version = "0.4.11"
1880
+ version = "0.4.12"
1877
1881
  source = "registry+https://github.com/rust-lang/crates.io-index"
1878
- checksum = "5651b5f6860a99bd1adb59dbfe1db8beb433e73709d9032b413a77e2fb7c066a"
1882
+ checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e"
1879
1883
  dependencies = [
1880
1884
  "futures-core",
1881
1885
  "futures-util",
@@ -1885,8 +1889,7 @@ dependencies = [
1885
1889
  "rand",
1886
1890
  "slab",
1887
1891
  "tokio",
1888
- "tokio-stream",
1889
- "tokio-util 0.6.9",
1892
+ "tokio-util 0.7.1",
1890
1893
  "tower-layer",
1891
1894
  "tower-service",
1892
1895
  "tracing",
@@ -1906,9 +1909,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
1906
1909
 
1907
1910
  [[package]]
1908
1911
  name = "tracing"
1909
- version = "0.1.30"
1912
+ version = "0.1.34"
1910
1913
  source = "registry+https://github.com/rust-lang/crates.io-index"
1911
- checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9"
1914
+ checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
1912
1915
  dependencies = [
1913
1916
  "cfg-if",
1914
1917
  "log",
@@ -1919,9 +1922,9 @@ dependencies = [
1919
1922
 
1920
1923
  [[package]]
1921
1924
  name = "tracing-attributes"
1922
- version = "0.1.19"
1925
+ version = "0.1.20"
1923
1926
  source = "registry+https://github.com/rust-lang/crates.io-index"
1924
- checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716"
1927
+ checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b"
1925
1928
  dependencies = [
1926
1929
  "proc-macro2",
1927
1930
  "quote",
@@ -1930,9 +1933,9 @@ dependencies = [
1930
1933
 
1931
1934
  [[package]]
1932
1935
  name = "tracing-core"
1933
- version = "0.1.22"
1936
+ version = "0.1.26"
1934
1937
  source = "registry+https://github.com/rust-lang/crates.io-index"
1935
- checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23"
1938
+ checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
1936
1939
  dependencies = [
1937
1940
  "lazy_static",
1938
1941
  "valuable",
@@ -1974,14 +1977,14 @@ dependencies = [
1974
1977
 
1975
1978
  [[package]]
1976
1979
  name = "tracing-subscriber"
1977
- version = "0.3.8"
1980
+ version = "0.3.11"
1978
1981
  source = "registry+https://github.com/rust-lang/crates.io-index"
1979
- checksum = "74786ce43333fcf51efe947aed9718fbe46d5c7328ec3f1029e818083966d9aa"
1982
+ checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
1980
1983
  dependencies = [
1981
1984
  "ansi_term",
1982
1985
  "lazy_static",
1983
1986
  "matchers",
1984
- "parking_lot 0.11.2",
1987
+ "parking_lot 0.12.0",
1985
1988
  "regex",
1986
1989
  "sharded-slab",
1987
1990
  "smallvec",
@@ -2079,11 +2082,17 @@ version = "0.10.2+wasi-snapshot-preview1"
2079
2082
  source = "registry+https://github.com/rust-lang/crates.io-index"
2080
2083
  checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
2081
2084
 
2085
+ [[package]]
2086
+ name = "wasi"
2087
+ version = "0.11.0+wasi-snapshot-preview1"
2088
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2089
+ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
2090
+
2082
2091
  [[package]]
2083
2092
  name = "wasm-bindgen"
2084
- version = "0.2.79"
2093
+ version = "0.2.80"
2085
2094
  source = "registry+https://github.com/rust-lang/crates.io-index"
2086
- checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06"
2095
+ checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
2087
2096
  dependencies = [
2088
2097
  "cfg-if",
2089
2098
  "wasm-bindgen-macro",
@@ -2091,9 +2100,9 @@ dependencies = [
2091
2100
 
2092
2101
  [[package]]
2093
2102
  name = "wasm-bindgen-backend"
2094
- version = "0.2.79"
2103
+ version = "0.2.80"
2095
2104
  source = "registry+https://github.com/rust-lang/crates.io-index"
2096
- checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca"
2105
+ checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
2097
2106
  dependencies = [
2098
2107
  "bumpalo",
2099
2108
  "lazy_static",
@@ -2106,9 +2115,9 @@ dependencies = [
2106
2115
 
2107
2116
  [[package]]
2108
2117
  name = "wasm-bindgen-macro"
2109
- version = "0.2.79"
2118
+ version = "0.2.80"
2110
2119
  source = "registry+https://github.com/rust-lang/crates.io-index"
2111
- checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01"
2120
+ checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
2112
2121
  dependencies = [
2113
2122
  "quote",
2114
2123
  "wasm-bindgen-macro-support",
@@ -2116,9 +2125,9 @@ dependencies = [
2116
2125
 
2117
2126
  [[package]]
2118
2127
  name = "wasm-bindgen-macro-support"
2119
- version = "0.2.79"
2128
+ version = "0.2.80"
2120
2129
  source = "registry+https://github.com/rust-lang/crates.io-index"
2121
- checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc"
2130
+ checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
2122
2131
  dependencies = [
2123
2132
  "proc-macro2",
2124
2133
  "quote",
@@ -2129,15 +2138,15 @@ dependencies = [
2129
2138
 
2130
2139
  [[package]]
2131
2140
  name = "wasm-bindgen-shared"
2132
- version = "0.2.79"
2141
+ version = "0.2.80"
2133
2142
  source = "registry+https://github.com/rust-lang/crates.io-index"
2134
- checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2"
2143
+ checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
2135
2144
 
2136
2145
  [[package]]
2137
2146
  name = "web-sys"
2138
- version = "0.3.56"
2147
+ version = "0.3.57"
2139
2148
  source = "registry+https://github.com/rust-lang/crates.io-index"
2140
- checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb"
2149
+ checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283"
2141
2150
  dependencies = [
2142
2151
  "js-sys",
2143
2152
  "wasm-bindgen",
@@ -2155,9 +2164,9 @@ dependencies = [
2155
2164
 
2156
2165
  [[package]]
2157
2166
  name = "which"
2158
- version = "4.2.4"
2167
+ version = "4.2.5"
2159
2168
  source = "registry+https://github.com/rust-lang/crates.io-index"
2160
- checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
2169
+ checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
2161
2170
  dependencies = [
2162
2171
  "either",
2163
2172
  "lazy_static",
@@ -2188,9 +2197,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
2188
2197
 
2189
2198
  [[package]]
2190
2199
  name = "windows-sys"
2191
- version = "0.32.0"
2200
+ version = "0.34.0"
2192
2201
  source = "registry+https://github.com/rust-lang/crates.io-index"
2193
- checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
2202
+ checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825"
2194
2203
  dependencies = [
2195
2204
  "windows_aarch64_msvc",
2196
2205
  "windows_i686_gnu",
@@ -2201,30 +2210,30 @@ dependencies = [
2201
2210
 
2202
2211
  [[package]]
2203
2212
  name = "windows_aarch64_msvc"
2204
- version = "0.32.0"
2213
+ version = "0.34.0"
2205
2214
  source = "registry+https://github.com/rust-lang/crates.io-index"
2206
- checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
2215
+ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d"
2207
2216
 
2208
2217
  [[package]]
2209
2218
  name = "windows_i686_gnu"
2210
- version = "0.32.0"
2219
+ version = "0.34.0"
2211
2220
  source = "registry+https://github.com/rust-lang/crates.io-index"
2212
- checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
2221
+ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed"
2213
2222
 
2214
2223
  [[package]]
2215
2224
  name = "windows_i686_msvc"
2216
- version = "0.32.0"
2225
+ version = "0.34.0"
2217
2226
  source = "registry+https://github.com/rust-lang/crates.io-index"
2218
- checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
2227
+ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956"
2219
2228
 
2220
2229
  [[package]]
2221
2230
  name = "windows_x86_64_gnu"
2222
- version = "0.32.0"
2231
+ version = "0.34.0"
2223
2232
  source = "registry+https://github.com/rust-lang/crates.io-index"
2224
- checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
2233
+ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"
2225
2234
 
2226
2235
  [[package]]
2227
2236
  name = "windows_x86_64_msvc"
2228
- version = "0.32.0"
2237
+ version = "0.34.0"
2229
2238
  source = "registry+https://github.com/rust-lang/crates.io-index"
2230
- checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
2239
+ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/core-bridge",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Temporal.io SDK Core<>Node bridge",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "eb5901f47e16f8c8fe36c1154d5176c5f3205efc"
46
+ "gitHead": "c241ab2f8e92966555dbd6d01dc072c8965ee6f4"
47
47
  }
@@ -7,6 +7,7 @@ use tokio::sync::{AcquireError, Semaphore, SemaphorePermit};
7
7
  /// acquired or restored through the provided methods
8
8
  pub(crate) struct MeteredSemaphore {
9
9
  pub sem: Semaphore,
10
+ max_permits: usize,
10
11
  metrics_ctx: MetricsContext,
11
12
  record_fn: fn(&MetricsContext, usize),
12
13
  }
@@ -19,6 +20,7 @@ impl MeteredSemaphore {
19
20
  ) -> Self {
20
21
  Self {
21
22
  sem: Semaphore::new(inital_permits),
23
+ max_permits: inital_permits,
22
24
  metrics_ctx,
23
25
  record_fn,
24
26
  }
@@ -30,9 +32,14 @@ impl MeteredSemaphore {
30
32
  res
31
33
  }
32
34
 
33
- /// Adds just one permit
35
+ /// Adds just one permit. Will not add if already at the initial/max capacity.
34
36
  pub fn add_permit(&self) {
35
- self.sem.add_permits(1);
36
- (self.record_fn)(&self.metrics_ctx, self.sem.available_permits());
37
+ if self.sem.available_permits() < self.max_permits {
38
+ self.sem.add_permits(1);
39
+ (self.record_fn)(&self.metrics_ctx, self.sem.available_permits());
40
+ } else if cfg!(debug_assertions) {
41
+ // Panic only during debug mode if this happens
42
+ panic!("Tried to add permit to a semaphore that already was at capacity!");
43
+ }
37
44
  }
38
45
  }
@@ -156,7 +156,12 @@ async fn new_queries(#[case] num_queries: usize) {
156
156
  let tasks = VecDeque::from(vec![
157
157
  hist_to_poll_resp(&t, wfid.to_owned(), 1.into(), TEST_Q.to_string()),
158
158
  {
159
- let mut pr = hist_to_poll_resp(&t, wfid.to_owned(), 2.into(), TEST_Q.to_string());
159
+ let mut pr = hist_to_poll_resp(
160
+ &t,
161
+ wfid.to_owned(),
162
+ ResponseType::OneTask(2),
163
+ TEST_Q.to_string(),
164
+ );
160
165
  pr.queries = HashMap::new();
161
166
  for i in 1..=num_queries {
162
167
  pr.queries.insert(
@@ -383,20 +388,50 @@ async fn legacy_query_after_complete(#[values(false, true)] full_history: bool)
383
388
  core.shutdown().await;
384
389
  }
385
390
 
391
+ enum QueryHists {
392
+ Empty,
393
+ Full,
394
+ Partial,
395
+ }
396
+ #[rstest::rstest]
386
397
  #[tokio::test]
387
- async fn query_cache_miss_causes_page_fetch_dont_reply_wft_too_early() {
398
+ async fn query_cache_miss_causes_page_fetch_dont_reply_wft_too_early(
399
+ #[values(QueryHists::Empty, QueryHists::Full, QueryHists::Partial)] hist_type: QueryHists,
400
+ ) {
388
401
  let wfid = "fake_wf_id";
389
402
  let query_resp = "response";
390
403
  let t = canned_histories::single_timer("1");
391
404
  let full_hist = t.get_full_history_info().unwrap();
392
405
  let tasks = VecDeque::from(vec![{
393
- // Create a partial task
394
- let mut pr = hist_to_poll_resp(
395
- &t,
396
- wfid.to_owned(),
397
- ResponseType::OneTask(2),
398
- TEST_Q.to_string(),
399
- );
406
+ let mut pr = match hist_type {
407
+ QueryHists::Empty => {
408
+ // Create a no-history poll response. This happens to be easiest to do by just ripping
409
+ // out the history after making a normal one.
410
+ let mut pr = hist_to_poll_resp(
411
+ &t,
412
+ wfid.to_owned(),
413
+ ResponseType::AllHistory,
414
+ TEST_Q.to_string(),
415
+ );
416
+ pr.history = Some(Default::default());
417
+ pr
418
+ }
419
+ QueryHists::Full => hist_to_poll_resp(
420
+ &t,
421
+ wfid.to_owned(),
422
+ ResponseType::AllHistory,
423
+ TEST_Q.to_string(),
424
+ ),
425
+ QueryHists::Partial => {
426
+ // Create a partial task
427
+ hist_to_poll_resp(
428
+ &t,
429
+ wfid.to_owned(),
430
+ ResponseType::OneTask(2),
431
+ TEST_Q.to_string(),
432
+ )
433
+ }
434
+ };
400
435
  pr.queries = HashMap::new();
401
436
  pr.queries.insert(
402
437
  "the-query".to_string(),
@@ -409,14 +444,16 @@ async fn query_cache_miss_causes_page_fetch_dont_reply_wft_too_early() {
409
444
  pr
410
445
  }]);
411
446
  let mut mock_client = mock_workflow_client();
412
- mock_client
413
- .expect_get_workflow_execution_history()
414
- .returning(move |_, _, _| {
415
- Ok(GetWorkflowExecutionHistoryResponse {
416
- history: Some(full_hist.clone().into()),
417
- ..Default::default()
418
- })
419
- });
447
+ if !matches!(hist_type, QueryHists::Full) {
448
+ mock_client
449
+ .expect_get_workflow_execution_history()
450
+ .returning(move |_, _, _| {
451
+ Ok(GetWorkflowExecutionHistoryResponse {
452
+ history: Some(full_hist.clone().into()),
453
+ ..Default::default()
454
+ })
455
+ });
456
+ }
420
457
  mock_client
421
458
  .expect_complete_workflow_task()
422
459
  .times(1)
@@ -1260,38 +1260,6 @@ async fn buffered_work_drained_on_shutdown() {
1260
1260
  });
1261
1261
  }
1262
1262
 
1263
- #[tokio::test]
1264
- async fn buffering_tasks_doesnt_count_toward_outstanding_max() {
1265
- let wfid = "fake_wf_id";
1266
- let t = canned_histories::single_timer("1");
1267
- let mock = mock_workflow_client();
1268
- let mut tasks = VecDeque::new();
1269
- // A way bigger task list than allowed outstanding tasks
1270
- tasks.extend(
1271
- std::iter::repeat(hist_to_poll_resp(
1272
- &t,
1273
- wfid.to_owned(),
1274
- 2.into(),
1275
- TEST_Q.to_string(),
1276
- ))
1277
- .take(20),
1278
- );
1279
- let mut mock = MocksHolder::from_client_with_responses(mock, tasks, []);
1280
- mock.worker_cfg(|wc| {
1281
- wc.max_cached_workflows = 10;
1282
- wc.max_outstanding_workflow_tasks = 5;
1283
- });
1284
- let core = mock_worker(mock);
1285
- // Poll for first WFT
1286
- core.poll_workflow_activation().await.unwrap();
1287
- // This will error out when the mock runs out of responses. Otherwise it would hang when we
1288
- // hit the max
1289
- assert_matches!(
1290
- core.poll_workflow_activation().await.unwrap_err(),
1291
- PollWfError::TonicError(_)
1292
- );
1293
- }
1294
-
1295
1263
  #[tokio::test]
1296
1264
  async fn fail_wft_then_recover() {
1297
1265
  let t = canned_histories::long_sequential_timers(1);
@@ -436,6 +436,7 @@ impl Worker {
436
436
  Ok(())
437
437
  }
438
438
  }
439
+
439
440
  pub(crate) async fn next_workflow_activation(&self) -> Result<WorkflowActivation, PollWfError> {
440
441
  // The poll needs to be in a loop because we can't guarantee tail call optimization in Rust
441
442
  // (simply) and we really, really need that for long-poll retries.
@@ -664,9 +665,9 @@ impl Worker {
664
665
  Some(a)
665
666
  }
666
667
  NewWfTaskOutcome::TaskBuffered => {
667
- // If the task was buffered, it's not actually outstanding, so we can
668
- // immediately return a permit.
669
- self.return_workflow_task_permit();
668
+ // Though the task is not outstanding in the lang sense, it is outstanding from the
669
+ // server perspective. We used to return a permit here, but that doesn't actually
670
+ // make much sense.
670
671
  None
671
672
  }
672
673
  NewWfTaskOutcome::Autocomplete | NewWfTaskOutcome::LocalActsOutstanding => {
@@ -252,7 +252,11 @@ impl WorkflowMachines {
252
252
 
253
253
  /// Let this workflow know that something we've been waiting locally on has resolved, like a
254
254
  /// local activity or side effect
255
- pub(crate) fn local_resolution(&mut self, resolution: LocalResolution) -> Result<()> {
255
+ ///
256
+ /// Returns true if the resolution did anything. EX: If the activity is already canceled and
257
+ /// used the TryCancel or Abandon modes, the resolution is uninteresting.
258
+ pub(crate) fn local_resolution(&mut self, resolution: LocalResolution) -> Result<bool> {
259
+ let mut result_important = true;
256
260
  match resolution {
257
261
  LocalResolution::LocalActivity(LocalActivityResolution {
258
262
  seq,
@@ -268,6 +272,9 @@ impl WorkflowMachines {
268
272
  if let Machines::LocalActivityMachine(ref mut lam) = *mach {
269
273
  let resps =
270
274
  lam.try_resolve(result, runtime, attempt, backoff, original_schedule_time)?;
275
+ if resps.is_empty() {
276
+ result_important = false;
277
+ }
271
278
  self.process_machine_responses(mk, resps)?;
272
279
  } else {
273
280
  return Err(WFMachinesError::Nondeterminism(format!(
@@ -279,7 +286,7 @@ impl WorkflowMachines {
279
286
  self.local_activity_data.done_executing(seq);
280
287
  }
281
288
  }
282
- Ok(())
289
+ Ok(result_important)
283
290
  }
284
291
 
285
292
  /// Drain all queued local activities that need executing or cancellation
@@ -96,7 +96,10 @@ impl WorkflowManager {
96
96
 
97
97
  /// Let this workflow know that something we've been waiting locally on has resolved, like a
98
98
  /// local activity or side effect
99
- pub fn notify_of_local_result(&mut self, resolved: LocalResolution) -> Result<()> {
99
+ ///
100
+ /// Returns true if the resolution did anything. EX: If the activity is already canceled and
101
+ /// used the TryCancel or Abandon modes, the resolution is uninteresting.
102
+ pub fn notify_of_local_result(&mut self, resolved: LocalResolution) -> Result<bool> {
100
103
  self.machines.local_resolution(resolved)
101
104
  }
102
105
 
@@ -407,7 +410,7 @@ pub mod managed_wf {
407
410
  &mut self,
408
411
  seq_num: u32,
409
412
  result: ActivityExecutionResult,
410
- ) -> Result<()> {
413
+ ) -> Result<bool> {
411
414
  self.mgr
412
415
  .notify_of_local_result(LocalResolution::LocalActivity(LocalActivityResolution {
413
416
  seq: seq_num,
@@ -207,12 +207,18 @@ impl WorkflowTaskManager {
207
207
  if let Some(reason) = pending_info.needs_eviction {
208
208
  act.append_evict_job(reason);
209
209
  }
210
- self.insert_outstanding_activation(&act)?;
211
- Ok(act)
210
+ // If for whatever reason we triggered a pending activation but there wasn't
211
+ // actually any work to be done, just ignore that.
212
+ if !act.jobs.is_empty() {
213
+ self.insert_outstanding_activation(&act)?;
214
+ self.cache_manager.lock().touch(&act.run_id);
215
+ Ok(Some(act))
216
+ } else {
217
+ Ok(None)
218
+ }
212
219
  })
213
220
  {
214
- self.cache_manager.lock().touch(&act.run_id);
215
- Some(act)
221
+ act
216
222
  } else {
217
223
  self.request_eviction(
218
224
  &pending_info.run_id,
@@ -618,8 +624,11 @@ impl WorkflowTaskManager {
618
624
  .get(0)
619
625
  .map(|ev| ev.event_id > 1)
620
626
  .unwrap_or_default();
627
+ let poll_resp_is_incremental =
628
+ poll_resp_is_incremental || poll_wf_resp.history.events.is_empty();
629
+
630
+ let mut did_miss_cache = !poll_resp_is_incremental;
621
631
 
622
- let mut did_miss_cache = false;
623
632
  let page_token = if !self.workflow_machines.exists(&run_id) && poll_resp_is_incremental {
624
633
  debug!(run_id=?run_id, "Workflow task has partial history, but workflow is not in \
625
634
  cache. Will fetch history");
@@ -765,7 +774,8 @@ impl WorkflowTaskManager {
765
774
  run_id: &str,
766
775
  resolved: LocalResolution,
767
776
  ) -> Result<(), WorkflowUpdateError> {
768
- self.workflow_machines
777
+ let result_was_important = self
778
+ .workflow_machines
769
779
  .access_sync(run_id, |wfm: &mut WorkflowManager| {
770
780
  wfm.notify_of_local_result(resolved)
771
781
  })?
@@ -774,7 +784,9 @@ impl WorkflowTaskManager {
774
784
  run_id: run_id.to_string(),
775
785
  })?;
776
786
 
777
- self.needs_activation(run_id);
787
+ if result_was_important {
788
+ self.needs_activation(run_id);
789
+ }
778
790
  Ok(())
779
791
  }
780
792
 
@@ -117,17 +117,13 @@ impl HistoryInfo {
117
117
  /// Remove events from the beginning of this history such that it looks like what would've been
118
118
  /// delivered on a sticky queue where the previously started task was the one before the last
119
119
  /// task in this history.
120
- ///
121
- /// This is not *fully* accurate in that it will include commands that were part of the last
122
- /// WFT completion, which the server would typically not include, but it's good enough for
123
- /// testing.
124
120
  pub fn make_incremental(&mut self) {
125
121
  let last_complete_ix = self
126
122
  .events
127
123
  .iter()
128
124
  .rposition(|he| he.event_type() == EventType::WorkflowTaskCompleted)
129
125
  .expect("Must be a WFT completed event in history");
130
- self.events.drain(0..=last_complete_ix);
126
+ self.events.drain(0..last_complete_ix);
131
127
  }
132
128
 
133
129
  pub fn events(&self) -> &[HistoryEvent] {
@@ -223,7 +219,7 @@ mod tests {
223
219
  fn incremental_works() {
224
220
  let t = single_timer("timer1");
225
221
  let hi = t.get_one_wft(2).unwrap();
226
- assert_eq!(hi.events().len(), 4);
227
- assert_eq!(hi.events()[0].event_id, 5);
222
+ assert_eq!(hi.events().len(), 5);
223
+ assert_eq!(hi.events()[0].event_id, 4);
228
224
  }
229
225
  }