From 81817b9768de6f32f86f5e1d3fa7c1eae2c8ad14 Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Tue, 14 Jan 2025 11:27:52 -0600 Subject: [PATCH 1/3] Drop Ruby 3.1, support Ruby 3.4 --- .github/workflows/build-gems.yml | 9 +- .github/workflows/ci.yml | 2 +- README.md | 4 +- temporalio/.rubocop.yml | 4 + temporalio/Cargo.lock | 923 ++++++++++++------ temporalio/Gemfile | 4 +- temporalio/lib/temporalio/internal/bridge.rb | 2 +- temporalio/rbs_collection.lock.yaml | 8 + temporalio/test/worker_activity_test.rb | 7 +- .../test/worker_workflow_handler_test.rb | 11 +- temporalio/test/worker_workflow_test.rb | 11 +- 11 files changed, 640 insertions(+), 345 deletions(-) diff --git a/.github/workflows/build-gems.yml b/.github/workflows/build-gems.yml index e163aeab..eb03c670 100644 --- a/.github/workflows/build-gems.yml +++ b/.github/workflows/build-gems.yml @@ -1,5 +1,6 @@ name: Build Gems on: + pull_request: push: branches: - main @@ -23,7 +24,7 @@ jobs: - name: Setup Ruby and Rust uses: oxidize-rb/actions/setup-ruby-and-rust@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true cargo-cache: true cargo-vendor: true @@ -35,7 +36,7 @@ jobs: id: cross-gem with: platform: ${{ matrix.rubyPlatform }} - ruby-versions: "3.1,3.2,3.3" + ruby-versions: "3.2,3.3,3.4" working-directory: ./temporalio - name: Upload gem @@ -55,7 +56,7 @@ jobs: - name: Setup Ruby and Rust uses: oxidize-rb/actions/setup-ruby-and-rust@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true cargo-cache: true cache-version: v1-source @@ -85,7 +86,7 @@ jobs: # TODO(cretz): Enable windows-latest if we can figure out Windows issue, see # https://github.com/temporalio/sdk-ruby/issues/172 os: [ubuntu-latest, macos-intel, macos-latest] - rubyVersion: ["3.1", "3.2", "3.3"] + rubyVersion: ["3.2", "3.3", "3.4"] include: - os: ubuntu-latest rubyPlatform: x86_64-linux diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d36f9484..df167e6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/temporalio/sdk-ruby/issues/172 os: [ubuntu-latest, macos-latest] # Earliest and latest supported - rubyVersion: ["3.2", "3.3"] + rubyVersion: ["3.2", "3.4"] include: - os: ubuntu-latest diff --git a/README.md b/README.md index 63e868c9..e5e4a51c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
Temporal Ruby SDK
-![Ruby 3.1 | 3.2 | 3.3](https://img.shields.io/badge/ruby-3.1%20%7C%203.2%20%7C%203.3-blue.svg?style=for-the-badge) +![Ruby 3.2 | 3.3 | 3.4](https://img.shields.io/badge/ruby-3.2%20|%203.3%20|%203.4-blue.svg?style=for-the-badge) [![MIT](https://img.shields.io/github/license/temporalio/sdk-ruby.svg?style=for-the-badge)](LICENSE) [![Gem](https://img.shields.io/gem/v/temporalio?style=for-the-badge)](https://rubygems.org/gems/temporalio) @@ -76,7 +76,7 @@ until the SDK is marked stable. ### Installation -The Ruby SDK works with Ruby 3.1, 3.2, and 3.3. 3.4 support will be added soon, and 3.1 support will be dropped soon. +The Ruby SDK works with Ruby 3.2, 3.3, and 3.4. Can require in a Gemfile like: diff --git a/temporalio/.rubocop.yml b/temporalio/.rubocop.yml index 57e93820..c6d5ca84 100644 --- a/temporalio/.rubocop.yml +++ b/temporalio/.rubocop.yml @@ -64,6 +64,10 @@ Metrics/ModuleLength: Metrics/PerceivedComplexity: Max: 40 +# We want the `*args` syntax instead of `*` so we can document clearly in YARD +Style/ArgumentsForwarding: + UseAnonymousForwarding: false + # We want classes to be documented Style/Documentation: Enabled: true diff --git a/temporalio/Cargo.lock b/temporalio/Cargo.lock index 9c033d02..97077d31 100644 --- a/temporalio/Cargo.lock +++ b/temporalio/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anes" @@ -51,9 +51,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -66,49 +66,50 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.90" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -143,9 +144,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", @@ -166,9 +167,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -185,8 +186,8 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.1", - "tower 0.5.1", + "sync_wrapper", + "tower 0.5.2", "tower-layer", "tower-service", ] @@ -206,7 +207,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper", "tower-layer", "tower-service", ] @@ -277,9 +278,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "block-buffer" @@ -304,9 +305,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bzip2" @@ -337,9 +338,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.30" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" dependencies = [ "jobserver", "libc", @@ -361,11 +362,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "num-traits", "serde", @@ -421,9 +428,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", "clap_derive", @@ -431,9 +438,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstream", "anstyle", @@ -443,9 +450,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ "heck", "proc-macro2", @@ -455,21 +462,21 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "console-api" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ed14aa9c9f927213c6e4f3ef75faaad3406134efe84ba2cb7983431d5f0931" +checksum = "8030735ecb0d128428b64cd379809817e620a40e5001c54465b99ec5feec2857" dependencies = [ "futures-core", "prost", @@ -480,9 +487,9 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e3a111a37f3333946ebf9da370ba5c5577b18eb342ec683eb488dd21980302" +checksum = "6539aa9c6a4cd31f4b1c040f860a1eac9aa80e7df6b05d506a6e7179936d6a01" dependencies = [ "console-api", "crossbeam-channel", @@ -512,9 +519,9 @@ checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -528,9 +535,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -597,18 +604,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -625,18 +632,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -733,9 +740,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -884,19 +891,19 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" @@ -918,9 +925,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -934,9 +941,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "form_urlencoded" @@ -1076,8 +1083,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1088,9 +1097,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "governor" @@ -1114,9 +1123,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -1124,7 +1133,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -1155,9 +1164,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "allocator-api2", "equivalent", @@ -1183,12 +1192,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.4.0" @@ -1206,9 +1209,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1258,9 +1261,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -1279,9 +1282,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", @@ -1297,9 +1300,9 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper", "hyper-util", @@ -1310,9 +1313,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1327,6 +1330,124 @@ dependencies = [ "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1335,12 +1456,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1355,12 +1487,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] @@ -1383,9 +1515,12 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" +checksum = "3b31349d02fe60f80bbbab1a9402364cad7460626d6030494b08ac4a2075bf81" +dependencies = [ + "rustversion", +] [[package]] name = "ipnet" @@ -1399,7 +1534,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -1439,9 +1574,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -1454,10 +1589,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1475,15 +1611,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets", @@ -1502,9 +1638,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1524,9 +1666,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "lru" @@ -1534,7 +1676,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] @@ -1605,20 +1747,19 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1626,9 +1767,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" dependencies = [ "cfg-if", "downcast", @@ -1640,9 +1781,9 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" dependencies = [ "cfg-if", "proc-macro2", @@ -1714,9 +1855,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -1750,7 +1891,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1766,7 +1907,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk", "prost", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic", ] @@ -1812,7 +1953,7 @@ dependencies = [ "percent-encoding", "rand", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -1875,7 +2016,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.6.0", + "indexmap 2.7.0", ] [[package]] @@ -1889,18 +2030,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", @@ -1909,9 +2050,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1955,9 +2096,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -1976,9 +2117,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "predicates-core", @@ -1986,15 +2127,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -2002,9 +2143,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", "syn", @@ -2021,9 +2162,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -2040,14 +2181,14 @@ dependencies = [ "memchr", "parking_lot", "protobuf", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "prost" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" dependencies = [ "bytes", "prost-derive", @@ -2055,11 +2196,10 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" dependencies = [ - "bytes", "heck", "itertools 0.13.0", "log", @@ -2076,9 +2216,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", "itertools 0.13.0", @@ -2089,9 +2229,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" dependencies = [ "prost", ] @@ -2150,9 +2290,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "quanta" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" dependencies = [ "crossbeam-utils", "libc", @@ -2165,45 +2305,49 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", "socket2", - "thiserror", + "thiserror 2.0.11", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand", "ring", - "rustc-hash 2.0.0", + "rustc-hash 2.1.0", "rustls", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.11", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -2213,9 +2357,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2252,9 +2396,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.2.0" +version = "11.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +checksum = "c6928fa44c097620b706542d428957635951bade7143269085389d42c8a4927e" dependencies = [ "bitflags", ] @@ -2281,18 +2425,18 @@ dependencies = [ [[package]] name = "rb-sys" -version = "0.9.102" +version = "0.9.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df4dec4b1d304c3b308a2cd86b1216ea45dd4361f4e9fa056f108332d0a450c1" +checksum = "1e955384e1a4dc64b71d1e4b39ed0edbd77c7bde4a10dfd5ad208e1160fddfa7" dependencies = [ "rb-sys-build", ] [[package]] name = "rb-sys-build" -version = "0.9.102" +version = "0.9.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d71de3e29d174b8fb17b5d4470f27d7aa2605f8a9d05fda0d3aeff30e05a570" +checksum = "c167c6571889b2550d6fcb315e8aa60bdb95e47e4b64793e3f65a30dc25afc85" dependencies = [ "bindgen", "lazy_static", @@ -2311,22 +2455,22 @@ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb" [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -2341,9 +2485,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2370,9 +2514,9 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -2399,10 +2543,11 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-util", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -2503,9 +2648,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustc_version" @@ -2542,22 +2687,22 @@ version = "0.1.0" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "log", "once_cell", @@ -2570,12 +2715,11 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", "security-framework", @@ -2592,9 +2736,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -2609,9 +2756,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -2630,9 +2777,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -2645,9 +2792,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ "bitflags", "core-foundation", @@ -2658,9 +2805,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2668,9 +2815,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "seq-macro" @@ -2680,18 +2827,18 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -2700,9 +2847,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.130" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610f75ff4a8e3cb29b85da56eabdd1bff5b06739059a4b8e2967fef32e5d9944" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "itoa", "memchr", @@ -2810,9 +2957,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2833,6 +2980,12 @@ dependencies = [ "lock_api", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -2847,9 +3000,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -2858,17 +3011,22 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] -name = "sync_wrapper" -version = "1.0.1" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "futures-core", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2886,9 +3044,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -2903,12 +3061,13 @@ checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -2939,10 +3098,10 @@ dependencies = [ "slotmap", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", "uuid", @@ -2964,7 +3123,7 @@ dependencies = [ "temporal-sdk-core", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tokio-util", @@ -3027,7 +3186,7 @@ dependencies = [ "temporal-sdk-core-api", "temporal-sdk-core-protos", "temporal-sdk-core-test-utils", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tokio-util", @@ -3051,7 +3210,7 @@ dependencies = [ "prost-types", "serde_json", "temporal-sdk-core-protos", - "thiserror", + "thiserror 1.0.69", "tonic", "tracing-core", "url", @@ -3071,7 +3230,7 @@ dependencies = [ "rand", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tonic", "tonic-build", "uuid", @@ -3099,7 +3258,7 @@ dependencies = [ "temporal-sdk-core", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -3138,24 +3297,44 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", @@ -3174,9 +3353,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "num-conv", @@ -3191,6 +3370,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -3203,9 +3392,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -3218,9 +3407,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -3237,9 +3426,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -3248,20 +3437,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -3270,9 +3458,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -3308,7 +3496,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -3384,14 +3572,15 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper", + "tokio", "tower-layer", "tower-service", ] @@ -3410,9 +3599,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3421,9 +3610,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -3432,9 +3621,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3453,9 +3642,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -3506,9 +3695,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typetag" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba3b6e86ffe0054b2c44f2d86407388b933b16cb0a70eea3929420db1d9bbe" +checksum = "044fc3365ddd307c297fe0fe7b2e70588cdab4d0f62dc52055ca0d11b174cf0e" dependencies = [ "erased-serde", "inventory", @@ -3519,35 +3708,20 @@ dependencies = [ [[package]] name = "typetag-impl" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" +checksum = "d9d30226ac9cbd2d1ff775f74e8febdab985dab14fb14aa2582c29a92d5555dc" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-xid" @@ -3563,15 +3737,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3580,9 +3766,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" dependencies = [ "getrandom", ] @@ -3626,24 +3812,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -3652,21 +3838,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3674,9 +3861,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -3687,15 +3874,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -3706,9 +3896,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3912,24 +4112,60 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", "rustix", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3951,6 +4187,27 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -3971,11 +4228,33 @@ dependencies = [ "syn", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zip" -version = "2.2.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "aes", "arbitrary", @@ -3987,13 +4266,13 @@ dependencies = [ "displaydoc", "flate2", "hmac", - "indexmap 2.6.0", + "indexmap 2.7.0", "lzma-rs", "memchr", "pbkdf2", "rand", "sha1", - "thiserror", + "thiserror 2.0.11", "time", "zeroize", "zopfli", diff --git a/temporalio/Gemfile b/temporalio/Gemfile index e7a4e980..0ceddee2 100644 --- a/temporalio/Gemfile +++ b/temporalio/Gemfile @@ -9,8 +9,8 @@ group :development do gem 'activerecord' gem 'async' gem 'base64' - gem 'grpc', '>= 1.65.0.pre2' - gem 'grpc-tools' + gem 'grpc', '~> 1.69' + gem 'grpc-tools', '~> 1.69' gem 'minitest' gem 'rake' gem 'rake-compiler' diff --git a/temporalio/lib/temporalio/internal/bridge.rb b/temporalio/lib/temporalio/internal/bridge.rb index e1c12966..b434a138 100644 --- a/temporalio/lib/temporalio/internal/bridge.rb +++ b/temporalio/lib/temporalio/internal/bridge.rb @@ -3,9 +3,9 @@ # Use Ruby-version-specific Rust library if present. When the gem is compiled # via the cross-gem action, it is placed in a version specific directory. E.g. # for the Linux gem as of this writing, there will be files at: -# * temporalio/internal/bridge/3.1/temporalio_bridge.so # * temporalio/internal/bridge/3.2/temporalio_bridge.so # * temporalio/internal/bridge/3.3/temporalio_bridge.so +# * temporalio/internal/bridge/3.4/temporalio_bridge.so # We fallback to just temporalio/internal/bridge/temporalio_bridge.so because # rake compile puts it there during manual build/development. begin diff --git a/temporalio/rbs_collection.lock.yaml b/temporalio/rbs_collection.lock.yaml index ce5a41b1..9b1ff062 100644 --- a/temporalio/rbs_collection.lock.yaml +++ b/temporalio/rbs_collection.lock.yaml @@ -37,6 +37,10 @@ gems: version: '0' source: type: stdlib +- name: benchmark + version: '0' + source: + type: stdlib - name: bigdecimal version: '0' source: @@ -173,6 +177,10 @@ gems: revision: e9bc1bf94c262e79a2d599a9c173342915b29808 remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems +- name: uri + version: '0' + source: + type: stdlib - name: yard version: '0.9' source: diff --git a/temporalio/test/worker_activity_test.rb b/temporalio/test/worker_activity_test.rb index 6dcf971e..639452bc 100644 --- a/temporalio/test/worker_activity_test.rb +++ b/temporalio/test/worker_activity_test.rb @@ -94,8 +94,8 @@ def test_logging execute_activity(LoggingActivity, retry_max_attempts: 2, logger: Logger.new($stdout)) end lines = out.split("\n") - assert(lines.one? { |l| l.include?('Test log') && l.include?(':attempt=>1') }) - assert(lines.one? { |l| l.include?('Test log') && l.include?(':attempt=>2') }) + assert(lines.one? { |l| l.include?('Test log') && (l.include?(':attempt=>1') || l.include?('attempt: 1')) }) + assert(lines.one? { |l| l.include?('Test log') && (l.include?(':attempt=>1') || l.include?('attempt: 2')) }) end class CustomNameActivity < Temporalio::Activity::Definition @@ -229,7 +229,8 @@ def execute(arg1, arg2, arg3) end def test_multi_param - assert_equal 'Args: {"foo"=>"bar"}, 123, baz', execute_activity(MultiParamActivity, { foo: 'bar' }, 123, 'baz') + assert_equal "Args: #{{ 'foo' => 'bar' }}, 123, baz", # rubocop:disable Lint/LiteralInInterpolation + execute_activity(MultiParamActivity, { foo: 'bar' }, 123, 'baz') end class InfoActivity < Temporalio::Activity::Definition diff --git a/temporalio/test/worker_workflow_handler_test.rb b/temporalio/test/worker_workflow_handler_test.rb index cadfe970..aa463c6b 100644 --- a/temporalio/test/worker_workflow_handler_test.rb +++ b/temporalio/test/worker_workflow_handler_test.rb @@ -606,15 +606,16 @@ def test_update_info # Confirm logs for workflow and updates lines = out.split("\n") assert(lines.any? do |l| - l.include?('In workflow') && l.include?(':workflow_type=>"UpdateInfoWorkflow"') && !l.include?('update_id') + l.include?('In workflow') && l.include?('workflow_type') && + l.include?('"UpdateInfoWorkflow"') && !l.include?('update_id') end) assert(lines.any? do |l| - l.include?('In update') && l.include?(':workflow_type=>"UpdateInfoWorkflow"') && - l.include?(':update_id=>"update-1"') + l.include?('In update') && l.include?('workflow_type') && + l.include?('"UpdateInfoWorkflow"') && l.include?('update_id') && l.include?('"update-1"') end) assert(lines.any? do |l| - l.include?('In update') && l.include?(':workflow_type=>"UpdateInfoWorkflow"') && - l.include?(':update_id=>"update-2"') + l.include?('In update') && l.include?('workflow_type') && + l.include?('"UpdateInfoWorkflow"') && l.include?('update_id') && l.include?('"update-2"') end) end end diff --git a/temporalio/test/worker_workflow_test.rb b/temporalio/test/worker_workflow_test.rb index af710fa9..d9c2897f 100644 --- a/temporalio/test/worker_workflow_test.rb +++ b/temporalio/test/worker_workflow_test.rb @@ -800,12 +800,13 @@ def test_logger # Confirm there is only one good line and it has contextual info good_lines = lines.select { |l| l.include?('some-log-1') } assert_equal 1, good_lines.size - assert_includes good_lines.first, ':workflow_type=>"LoggerWorkflow"' + assert_includes good_lines.first, 'workflow_type' + assert_includes good_lines.first, '"LoggerWorkflow"' # Confirm there are two bad lines, and they don't have contextual info bad_lines = lines.select { |l| l.include?('some-log-2') } assert bad_lines.size >= 2 - refute_includes bad_lines.first, ':workflow_type=>"LoggerWorkflow"' + refute_includes bad_lines.first, '"LoggerWorkflow"' # Confirm task failure logs out, = safe_capture_io do @@ -814,9 +815,9 @@ def test_logger assert_eventually_task_fail(handle:) end end - lines = out.split("\n").select { |l| l.include?(':workflow_type=>"LoggerWorkflow"') } - assert(lines.any? { |l| l.include?('Failed activation') && l.include?(':workflow_type=>"LoggerWorkflow"') }) - assert(lines.any? { |l| l.include?('Some failure') && l.include?(':workflow_type=>"LoggerWorkflow"') }) + lines = out.split("\n").select { |l| l.include?('workflow_type') && l.include?('"LoggerWorkflow"') } + assert(lines.any? { |l| l.include?('Failed activation') }) + assert(lines.any? { |l| l.include?('Some failure') }) end class CancelWorkflow < Temporalio::Workflow::Definition From 75188502df53d13b701573fb3533952cb8ff012e Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Tue, 14 Jan 2025 17:18:18 -0600 Subject: [PATCH 2/3] Change Struct to Data for most structs --- temporalio/lib/temporalio/activity/info.rb | 41 +-- temporalio/lib/temporalio/client.rb | 9 +- .../lib/temporalio/client/connection.rb | 86 +++--- .../lib/temporalio/client/interceptor.rb | 120 ++++---- temporalio/lib/temporalio/client/schedule.rb | 271 ++++++++---------- .../internal/client/implementation.rb | 17 +- temporalio/lib/temporalio/retry_policy.rb | 5 +- temporalio/lib/temporalio/runtime.rb | 30 +- .../testing/workflow_environment.rb | 5 +- temporalio/lib/temporalio/worker.rb | 9 +- .../lib/temporalio/worker/interceptor.rb | 70 ++--- temporalio/sig/temporalio/activity/info.rbs | 2 + temporalio/sig/temporalio/client.rbs | 14 +- .../sig/temporalio/client/connection.rbs | 54 ++-- .../sig/temporalio/client/interceptor.rbs | 212 +++++++------- temporalio/sig/temporalio/client/schedule.rbs | 216 +++++++------- temporalio/sig/temporalio/retry_policy.rbs | 10 +- temporalio/sig/temporalio/runtime.rbs | 38 +-- temporalio/sig/temporalio/worker.rbs | 56 ++-- .../sig/temporalio/worker/interceptor.rbs | 154 +++++----- temporalio/test/client_schedule_test.rb | 30 +- temporalio/test/client_test.rb | 3 +- temporalio/test/client_workflow_test.rb | 5 +- temporalio/test/runtime_test.rb | 8 +- .../test/testing/activity_environment_test.rb | 3 +- temporalio/test/worker_activity_test.rb | 3 +- temporalio/test/worker_workflow_test.rb | 33 ++- 27 files changed, 734 insertions(+), 770 deletions(-) diff --git a/temporalio/lib/temporalio/activity/info.rb b/temporalio/lib/temporalio/activity/info.rb index 808063c4..77f07751 100644 --- a/temporalio/lib/temporalio/activity/info.rb +++ b/temporalio/lib/temporalio/activity/info.rb @@ -2,6 +2,26 @@ module Temporalio module Activity + Info = Data.define( + :activity_id, + :activity_type, + :attempt, + :current_attempt_scheduled_time, + :heartbeat_details, + :heartbeat_timeout, + :local?, + :schedule_to_close_timeout, + :scheduled_time, + :start_to_close_timeout, + :started_time, + :task_queue, + :task_token, + :workflow_id, + :workflow_namespace, + :workflow_run_id, + :workflow_type + ) + # Information about an activity. # # @!attribute activity_id @@ -39,25 +59,6 @@ module Activity # @return [String] Workflow run ID that started this activity. # @!attribute workflow_type # @return [String] Workflow type name that started this activity. - Info = Struct.new( - :activity_id, - :activity_type, - :attempt, - :current_attempt_scheduled_time, - :heartbeat_details, - :heartbeat_timeout, - :local?, - :schedule_to_close_timeout, - :scheduled_time, - :start_to_close_timeout, - :started_time, - :task_queue, - :task_token, - :workflow_id, - :workflow_namespace, - :workflow_run_id, - :workflow_type, - keyword_init: true - ) + class Info; end # rubocop:disable Lint/EmptyClass end end diff --git a/temporalio/lib/temporalio/client.rb b/temporalio/lib/temporalio/client.rb index b2559e45..291272aa 100644 --- a/temporalio/lib/temporalio/client.rb +++ b/temporalio/lib/temporalio/client.rb @@ -33,17 +33,18 @@ module Temporalio # synchronous and asynchronous contexts. Internally they use callbacks based on {::Queue} which means they are # Fiber-compatible. class Client - # Options as returned from {options} for +**to_h+ splat use in {initialize}. See {initialize} for details. - Options = Struct.new( + Options = Data.define( :connection, :namespace, :data_converter, :interceptors, :logger, - :default_workflow_query_reject_condition, - keyword_init: true + :default_workflow_query_reject_condition ) + # Options as returned from {options} for +**to_h+ splat use in {initialize}. See {initialize} for details. + class Options; end # rubocop:disable Lint/EmptyClass + # Connect to Temporal server. This is a shortcut for +Connection.new+ followed by +Client.new+. # # @param target_host [String] +host:port+ for the Temporal server. For local development, this is often diff --git a/temporalio/lib/temporalio/client/connection.rb b/temporalio/lib/temporalio/client/connection.rb index 3ada7716..be37e92f 100644 --- a/temporalio/lib/temporalio/client/connection.rb +++ b/temporalio/lib/temporalio/client/connection.rb @@ -14,8 +14,7 @@ class Client # Connection to Temporal server that is not namespace specific. Most users will use {Client.connect} instead of this # directly. class Connection - # Options as returned from {options} for +**to_h+ splat use in {initialize}. See {initialize} for details. - Options = Struct.new( + Options = Data.define( :target_host, :api_key, :tls, @@ -25,8 +24,17 @@ class Connection :keep_alive, :http_connect_proxy, :runtime, - :lazy_connect, - keyword_init: true + :lazy_connect + ) + + # Options as returned from {options} for +**to_h+ splat use in {initialize}. See {initialize} for details. + class Options; end # rubocop:disable Lint/EmptyClass + + TLSOptions = Data.define( + :client_cert, + :client_private_key, + :server_root_ca_cert, + :domain ) # TLS options. All attributes are optional, and an empty options set just enables default TLS. @@ -41,12 +49,15 @@ class Connection # @!attribute domain # @return [String, nil] SNI override. This is only needed for self-hosted servers with certificates that do not # match the hostname being connected to. - TLSOptions = Struct.new( - :client_cert, - :client_private_key, - :server_root_ca_cert, - :domain, - keyword_init: true + class TLSOptions; end # rubocop:disable Lint/EmptyClass + + RPCRetryOptions = Data.define( + :initial_interval, + :randomization_factor, + :multiplier, + :max_interval, + :max_elapsed_time, + :max_retries ) # Retry options for server calls when retry is enabled (which it is by default on all high-level {Client} calls). @@ -64,27 +75,24 @@ class Connection # @return [Float] Maximum total time, default 10.0. Can use 0 for no max. # @!attribute max_retries # @return [Integer] Maximum number of retries, default 10. - RPCRetryOptions = Struct.new( - :initial_interval, - :randomization_factor, - :multiplier, - :max_interval, - :max_elapsed_time, - :max_retries, - keyword_init: true - ) do - def initialize(**kwargs) - # @type var kwargs: untyped - kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) - kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) - kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) - kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) - kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) - kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) + class RPCRetryOptions + def initialize( + initial_interval: 0.1, + randomization_factor: 0.2, + multiplier: 1.5, + max_interval: 5.0, + max_elapsed_time: 10.0, + max_retries: 10 + ) super end end + KeepAliveOptions = Data.define( + :interval, + :timeout + ) + # Keep-alive options for client connections. For most users, the default is preferred. # # @!attribute interval @@ -92,19 +100,18 @@ def initialize(**kwargs) # @!attribute timeout # @return [Float] Timeout that the keep alive must be responded to within or the connection will be closed, # default 15.0. - KeepAliveOptions = Struct.new( - :interval, - :timeout, - keyword_init: true - ) do - def initialize(**kwargs) - # @type var kwargs: untyped - kwargs[:interval] = 30.0 unless kwargs.key?(:interval) - kwargs[:timeout] = 15.0 unless kwargs.key?(:timeout) + class KeepAliveOptions + def initialize(interval: 30.0, timeout: 15.0) super end end + HTTPConnectProxyOptions = Data.define( + :target_host, + :basic_auth_user, + :basic_auth_pass + ) + # Options for HTTP CONNECT proxy for client connections. # # @!attribute target_host @@ -113,12 +120,7 @@ def initialize(**kwargs) # @return [String, nil] User for HTTP basic auth for the proxy, must be combined with {basic_auth_pass}. # @!attribute basic_auth_pass # @return [String, nil] Pass for HTTP basic auth for the proxy, must be combined with {basic_auth_user}. - HTTPConnectProxyOptions = Struct.new( - :target_host, - :basic_auth_user, # Optional - :basic_auth_pass, # Optional, - keyword_init: true - ) + class HTTPConnectProxyOptions; end # rubocop:disable Lint/EmptyClass # @return [Options] Frozen options for this client which has the same attributes as {initialize}. attr_reader :options diff --git a/temporalio/lib/temporalio/client/interceptor.rb b/temporalio/lib/temporalio/client/interceptor.rb index 5bfff0f7..4ccf66cb 100644 --- a/temporalio/lib/temporalio/client/interceptor.rb +++ b/temporalio/lib/temporalio/client/interceptor.rb @@ -18,7 +18,7 @@ def intercept_client(next_interceptor) end # Input for {Outbound.start_workflow}. - StartWorkflowInput = Struct.new( + StartWorkflowInput = Data.define( :workflow, :args, :workflow_id, @@ -35,68 +35,61 @@ def intercept_client(next_interceptor) :start_delay, :request_eager_start, :headers, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.list_workflows}. - ListWorkflowsInput = Struct.new( + ListWorkflowsInput = Data.define( :query, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.count_workflows}. - CountWorkflowsInput = Struct.new( + CountWorkflowsInput = Data.define( :query, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.describe_workflow}. - DescribeWorkflowInput = Struct.new( + DescribeWorkflowInput = Data.define( :workflow_id, :run_id, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.fetch_workflow_history_events}. - FetchWorkflowHistoryEventsInput = Struct.new( + FetchWorkflowHistoryEventsInput = Data.define( :workflow_id, :run_id, :wait_new_event, :event_filter_type, :skip_archival, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.signal_workflow}. - SignalWorkflowInput = Struct.new( + SignalWorkflowInput = Data.define( :workflow_id, :run_id, :signal, :args, :headers, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.query_workflow}. - QueryWorkflowInput = Struct.new( + QueryWorkflowInput = Data.define( :workflow_id, :run_id, :query, :args, :reject_condition, :headers, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.start_workflow_update}. - StartWorkflowUpdateInput = Struct.new( + StartWorkflowUpdateInput = Data.define( :workflow_id, :run_id, :update_id, @@ -104,143 +97,126 @@ def intercept_client(next_interceptor) :args, :wait_for_stage, :headers, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.poll_workflow_update}. - PollWorkflowUpdateInput = Struct.new( + PollWorkflowUpdateInput = Data.define( :workflow_id, :run_id, :update_id, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.cancel_workflow}. - CancelWorkflowInput = Struct.new( + CancelWorkflowInput = Data.define( :workflow_id, :run_id, :first_execution_run_id, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.terminate_workflow}. - TerminateWorkflowInput = Struct.new( + TerminateWorkflowInput = Data.define( :workflow_id, :run_id, :first_execution_run_id, :reason, :details, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.create_schedule}. - CreateScheduleInput = Struct.new( + CreateScheduleInput = Data.define( :id, :schedule, :trigger_immediately, :backfills, :memo, :search_attributes, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.list_schedules}. - ListSchedulesInput = Struct.new( + ListSchedulesInput = Data.define( :query, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.backfill_schedule}. - BackfillScheduleInput = Struct.new( + BackfillScheduleInput = Data.define( :id, :backfills, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.delete_schedule}. - DeleteScheduleInput = Struct.new( + DeleteScheduleInput = Data.define( :id, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.describe_schedule}. - DescribeScheduleInput = Struct.new( + DescribeScheduleInput = Data.define( :id, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.pause_schedule}. - PauseScheduleInput = Struct.new( + PauseScheduleInput = Data.define( :id, :note, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.trigger_schedule}. - TriggerScheduleInput = Struct.new( + TriggerScheduleInput = Data.define( :id, :overlap, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.unpause_schedule}. - UnpauseScheduleInput = Struct.new( + UnpauseScheduleInput = Data.define( :id, :note, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.update_schedule}. - UpdateScheduleInput = Struct.new( + UpdateScheduleInput = Data.define( :id, :updater, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.heartbeat_async_activity}. - HeartbeatAsyncActivityInput = Struct.new( + HeartbeatAsyncActivityInput = Data.define( :task_token_or_id_reference, :details, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.complete_async_activity}. - CompleteAsyncActivityInput = Struct.new( + CompleteAsyncActivityInput = Data.define( :task_token_or_id_reference, :result, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.fail_async_activity}. - FailAsyncActivityInput = Struct.new( + FailAsyncActivityInput = Data.define( :task_token_or_id_reference, :error, :last_heartbeat_details, - :rpc_options, - keyword_init: true + :rpc_options ) # Input for {Outbound.report_cancellation_async_activity}. - ReportCancellationAsyncActivityInput = Struct.new( + ReportCancellationAsyncActivityInput = Data.define( :task_token_or_id_reference, :details, - :rpc_options, - keyword_init: true + :rpc_options ) # Outbound interceptor for intercepting client calls. This should be extended by users needing to intercept client diff --git a/temporalio/lib/temporalio/client/schedule.rb b/temporalio/lib/temporalio/client/schedule.rb index bf80ff0a..0da47070 100644 --- a/temporalio/lib/temporalio/client/schedule.rb +++ b/temporalio/lib/temporalio/client/schedule.rb @@ -8,12 +8,11 @@ module Temporalio class Client - Schedule = Struct.new( + Schedule = Data.define( :action, :spec, :policy, - :state, - keyword_init: true + :state ) # A schedule for periodically running an action. @@ -57,12 +56,11 @@ def _to_proto(data_converter) ) end - Description = Struct.new( # rubocop:disable Layout/ClassStructure + Description = Data.define( # rubocop:disable Layout/ClassStructure :id, :schedule, :info, - :raw_description, - keyword_init: true + :raw_description ) # Description of a schedule. @@ -77,17 +75,17 @@ def _to_proto(data_converter) # @return [Api::WorkflowService::V1::DescribeScheduleResponse] Raw description of the schedule. class Description # @!visibility private - def initialize(id, raw_description, data_converter) + def initialize(id:, raw_description:, data_converter:) + @memo = Internal::ProtoUtils::LazyMemo.new(raw_description.memo, data_converter) + @search_attributes = Internal::ProtoUtils::LazySearchAttributes.new(raw_description.search_attributes) # steep:ignore:start super( id:, schedule: Schedule._from_proto(raw_description.schedule, data_converter), - info: Info.new(raw_description.info), + info: Info.new(raw_info: raw_description.info), raw_description: ) # steep:ignore:end - @memo = Internal::ProtoUtils::LazyMemo.new(raw_description.memo, data_converter) - @search_attributes = Internal::ProtoUtils::LazySearchAttributes.new(raw_description.search_attributes) end # @return [Hash, nil] Memo for the schedule, converted lazily on first call. @@ -101,7 +99,7 @@ def search_attributes end end - Info = Struct.new( + Info = Data.define( :num_actions, :num_actions_missed_catchup_window, :num_actions_skipped_overlap, @@ -109,8 +107,7 @@ def search_attributes :recent_actions, :next_action_times, :created_at, - :last_updated_at, - keyword_init: true + :last_updated_at ) # Information about a schedule. @@ -133,14 +130,16 @@ def search_attributes # @return [Time, nil] When the schedule was last updated. class Info # @!visibility private - def initialize(raw_info) + def initialize(raw_info:) # steep:ignore:start super( num_actions: raw_info.action_count, num_actions_missed_catchup_window: raw_info.missed_catchup_window, num_actions_skipped_overlap: raw_info.overlap_skipped, - running_actions: raw_info.running_workflows.map { |w| ActionExecution::StartWorkflow.new(w) }, - recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(a) }, + running_actions: raw_info.running_workflows.map do |w| + ActionExecution::StartWorkflow.new(raw_execution: w) + end, + recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) }, next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) }, created_at: Internal::ProtoUtils.timestamp_to_time(raw_info.create_time), last_updated_at: Internal::ProtoUtils.timestamp_to_time(raw_info.update_time) @@ -163,7 +162,7 @@ def _to_proto(data_converter) raise NotImplementedError end - StartWorkflow = Struct.new( + StartWorkflow = Data.define( :workflow, :args, :id, @@ -174,8 +173,7 @@ def _to_proto(data_converter) :retry_policy, :memo, :search_attributes, - :headers, - keyword_init: true + :headers ) # Schedule action to start a workflow. @@ -205,6 +203,52 @@ def _to_proto(data_converter) class StartWorkflow include Action + class << self + alias _original_new new + + # Create start-workflow schedule action. + # + # @param workflow [Class, Symbol, String] Workflow. + # @param args [Array] Arguments to the workflow. + # @param id [String] Unique identifier for the workflow execution. + # @param task_queue [String] Task queue to run the workflow on. + # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and + # continue as new. + # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. + # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. + # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. + # @param memo [Hash, nil] Memo for the workflow. + # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. + # @param headers [Hash, nil] Headers for the workflow. + def new( + workflow, + *args, + id:, + task_queue:, + execution_timeout: nil, + run_timeout: nil, + task_timeout: nil, + retry_policy: nil, + memo: nil, + search_attributes: nil, + headers: nil + ) + _original_new( # steep:ignore + workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), + args:, + id:, + task_queue:, + execution_timeout:, + run_timeout:, + task_timeout:, + retry_policy:, + memo:, + search_attributes:, + headers: + ) + end + end + # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( @@ -222,50 +266,6 @@ def self._from_proto(raw_info, data_converter) ) end - # Create start-workflow schedule action. - # - # @param workflow [Class, Symbol, String] Workflow. - # @param args [Array] Arguments to the workflow. - # @param id [String] Unique identifier for the workflow execution. - # @param task_queue [String] Task queue to run the workflow on. - # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and - # continue as new. - # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. - # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. - # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. - # @param memo [Hash, nil] Memo for the workflow. - # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. - # @param headers [Hash, nil] Headers for the workflow. - def initialize( - workflow, - *args, - id:, - task_queue:, - execution_timeout: nil, - run_timeout: nil, - task_timeout: nil, - retry_policy: nil, - memo: nil, - search_attributes: nil, - headers: nil - ) - # steep:ignore:start - super( - workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), - args:, - id:, - task_queue:, - execution_timeout:, - run_timeout:, - task_timeout:, - retry_policy:, - memo:, - search_attributes:, - headers:, - ) - # steep:ignore:end - end - # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( @@ -313,11 +313,10 @@ module OverlapPolicy ALLOW_ALL = Api::Enums::V1::ScheduleOverlapPolicy::SCHEDULE_OVERLAP_POLICY_ALLOW_ALL end - Backfill = Struct.new( + Backfill = Data.define( :start_at, :end_at, - :overlap, - keyword_init: true + :overlap ) # Time period and policy for actions taken as if the time passed right now. @@ -354,10 +353,9 @@ def _to_proto # Base module mixed in by specific action executions. module ActionExecution - StartWorkflow = Struct.new( + StartWorkflow = Data.define( :workflow_id, - :first_execution_run_id, - keyword_init: true + :first_execution_run_id ) # Execution of a scheduled workflow start. @@ -370,7 +368,7 @@ class StartWorkflow include ActionExecution # @!visibility private - def initialize(raw_execution) + def initialize(raw_execution:) # steep:ignore:start super( workflow_id: raw_execution.workflow_id, @@ -381,11 +379,10 @@ def initialize(raw_execution) end end - ActionResult = Struct.new( + ActionResult = Data.define( :scheduled_at, :started_at, - :action, - keyword_init: true + :action ) # Information about when an action took place. @@ -398,18 +395,18 @@ def initialize(raw_execution) # @return [ActionExecution] Action that took place. class ActionResult # @!visibility private - def initialize(raw_result) + def initialize(raw_result:) # steep:ignore:start super( scheduled_at: Internal::ProtoUtils.timestamp_to_time(raw_result.schedule_time), started_at: Internal::ProtoUtils.timestamp_to_time(raw_result.actual_time), - action: ActionExecution::StartWorkflow.new(raw_result.start_workflow_result) + action: ActionExecution::StartWorkflow.new(raw_execution: raw_result.start_workflow_result) ) # steep:ignore:end end end - Spec = Struct.new( + Spec = Data.define( :calendars, :intervals, :cron_expressions, @@ -417,8 +414,7 @@ def initialize(raw_result) :start_at, :end_at, :jitter, - :time_zone_name, - keyword_init: true + :time_zone_name ) # Specification of the times scheduled actions may occur. @@ -499,7 +495,7 @@ def _to_proto ) end - Calendar = Struct.new( # rubocop:disable Layout/ClassStructure + Calendar = Data.define( # rubocop:disable Layout/ClassStructure :second, :minute, :hour, @@ -507,8 +503,7 @@ def _to_proto :month, :year, :day_of_week, - :comment, - keyword_init: true + :comment ) # Specification relative to calendar time when to run an action. @@ -585,10 +580,9 @@ def _to_proto end end - Interval = Struct.new( + Interval = Data.define( :every, - :offset, - keyword_init: true + :offset ) # Specification for scheduling on an interval. @@ -626,11 +620,10 @@ def _to_proto end end - Range = Struct.new( + Range = Data.define( :start, :finish, - :step, - keyword_init: true + :step ) # Inclusive range for a schedule match value. @@ -642,6 +635,23 @@ def _to_proto # @!attribute step # @return [Integer] Step to take between each value. Defaults as 1. class Range + class << self + alias _original_new new + + # Create inclusive range. + # + # @param start [Integer] Inclusive start of the range. + # @param finish [Integer] Inclusive end of the range. If unset or less than start, defaults to start. + # @param step [Integer] Step to take between each value. Defaults as 1. + def new(start, finish = [0, start].max, step = 1) + _original_new( # steep:ignore + start:, + finish:, + step: + ) + end + end + # @!visibility private def self._from_proto(raw_range) Schedule::Range.new( @@ -661,21 +671,6 @@ def self._to_protos(ranges) ranges.map(&:_to_proto) end - # Create inclusive range. - # - # @param start [Integer] Inclusive start of the range. - # @param finish [Integer] Inclusive end of the range. If unset or less than start, defaults to start. - # @param step [Integer] Step to take between each value. Defaults as 1. - def initialize(start, finish = [0, start].max, step = 1) - # steep:ignore:start - super( - start:, - finish:, - step: - ) - # steep:ignore:end - end - # @!visibility private def _to_proto Api::Schedule::V1::Range.new( @@ -686,11 +681,10 @@ def _to_proto end end - Policy = Struct.new( + Policy = Data.define( :overlap, :catchup_window, - :pause_on_failure, - keyword_init: true + :pause_on_failure ) # Policies of a schedule. @@ -739,12 +733,11 @@ def _to_proto end end - State = Struct.new( + State = Data.define( :note, :paused, :limited_actions, - :remaining_actions, - keyword_init: true + :remaining_actions ) # State of a schedule. @@ -801,10 +794,9 @@ def _to_proto end end - Update = Struct.new( + Update = Data.define( :schedule, - :search_attributes, - keyword_init: true + :search_attributes ) # Result of an update callback for {ScheduleHandle.update}. @@ -826,19 +818,17 @@ def initialize(schedule:, search_attributes: nil) # # @!attribute description # @return [Description] Current description of the schedule. - Input = Struct.new( # rubocop:disable Layout/ClassStructure - :description, - keyword_init: true + Input = Data.define( # rubocop:disable Layout/ClassStructure + :description ) end module List - Description = Struct.new( + Description = Data.define( :id, :schedule, :info, - :raw_entry, - keyword_init: true + :raw_entry ) # Description of a listed schedule. @@ -855,17 +845,17 @@ module List # @return [Api::Schedule::V1::ScheduleListEntry] Raw description of the schedule. class Description # @!visibility private - def initialize(raw_entry, data_converter) + def initialize(raw_entry:, data_converter:) + @memo = Internal::ProtoUtils::LazyMemo.new(raw_entry.memo, data_converter) + @search_attributes = Internal::ProtoUtils::LazySearchAttributes.new(raw_entry.search_attributes) # steep:ignore:start super( id: raw_entry.schedule_id, - schedule: (Schedule.new(raw_entry.info) if raw_entry.info), - info: (Info.new(raw_entry.info) if raw_entry.info), + schedule: (Schedule.new(raw_info: raw_entry.info) if raw_entry.info), + info: (Info.new(raw_info: raw_entry.info) if raw_entry.info), raw_entry: ) # steep:ignore:end - @memo = Internal::ProtoUtils::LazyMemo.new(raw_entry.memo, data_converter) - @search_attributes = Internal::ProtoUtils::LazySearchAttributes.new(raw_entry.search_attributes) end # @return [Hash, nil] Memo for the schedule, converted lazily on first call. @@ -879,11 +869,10 @@ def search_attributes end end - Schedule = Struct.new( + Schedule = Data.define( :action, :spec, - :state, - keyword_init: true + :state ) # Details for a listed schedule. @@ -896,14 +885,14 @@ def search_attributes # @return [State] State of the schedule. class Schedule # @!visibility private - def initialize(raw_info) + def initialize(raw_info:) raise 'Unknown action on schedule' unless raw_info.workflow_type # steep:ignore:start super( - action: Action::StartWorkflow.new(raw_info.workflow_type.name), + action: Action::StartWorkflow.new(workflow: raw_info.workflow_type.name), spec: Spec._from_proto(raw_info.spec), - state: State.new(raw_info) + state: State.new(raw_info:) ) # steep:ignore:end end @@ -911,9 +900,8 @@ def initialize(raw_info) # Base module mixed in by specific actions a listed schedule can take. module Action - StartWorkflow = Struct.new( - :workflow, - keyword_init: true + StartWorkflow = Data.define( + :workflow ) # Action to start a workflow on a listed schedule. @@ -922,18 +910,12 @@ module Action # @return [String] Workflow type name. class StartWorkflow include Action - - # @!visibility private - def initialize(workflow) - super(workflow:) # steep:ignore - end end end - Info = Struct.new( + Info = Data.define( :recent_actions, - :next_action_times, - keyword_init: true + :next_action_times ) # Information about a listed schedule. @@ -946,20 +928,19 @@ def initialize(workflow) # {Temporalio::Client::Schedule::Info.next_action_times}. class Info # @!visibility private - def initialize(raw_info) + def initialize(raw_info:) # steep:ignore:start super( - recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(a) }, + recent_actions: raw_info.recent_actions.map { |a| ActionResult.new(raw_result: a) }, next_action_times: raw_info.future_action_times.map { |t| Internal::ProtoUtils.timestamp_to_time(t) } ) # steep:ignore:end end end - State = Struct.new( + State = Data.define( :note, - :paused, - keyword_init: true + :paused ) # State of a listed schedule. @@ -971,7 +952,7 @@ def initialize(raw_info) # @return [Boolean] Whether the schedule is paused. class State # @!visibility private - def initialize(raw_info) + def initialize(raw_info:) # steep:ignore:start super( note: Internal::ProtoUtils.string_or(raw_info.notes), diff --git a/temporalio/lib/temporalio/internal/client/implementation.rb b/temporalio/lib/temporalio/internal/client/implementation.rb index d315b6a1..22732a98 100644 --- a/temporalio/lib/temporalio/internal/client/implementation.rb +++ b/temporalio/lib/temporalio/internal/client/implementation.rb @@ -434,7 +434,10 @@ def list_schedules(input) rpc_options: Implementation.with_default_rpc_options(input.rpc_options) ) resp.schedules.each do |raw_entry| - yielder << Temporalio::Client::Schedule::List::Description.new(raw_entry, @client.data_converter) + yielder << Temporalio::Client::Schedule::List::Description.new( + raw_entry:, + data_converter: @client.data_converter + ) end break if resp.next_page_token.empty? @@ -473,15 +476,15 @@ def delete_schedule(input) def describe_schedule(input) Temporalio::Client::Schedule::Description.new( - input.id, - @client.workflow_service.describe_schedule( + id: input.id, + raw_description: @client.workflow_service.describe_schedule( Api::WorkflowService::V1::DescribeScheduleRequest.new( namespace: @client.namespace, schedule_id: input.id ), rpc_options: Implementation.with_default_rpc_options(input.rpc_options) ), - @client.data_converter + data_converter: @client.data_converter ) end @@ -538,15 +541,15 @@ def update_schedule(input) update = input.updater.call( Temporalio::Client::Schedule::Update::Input.new( description: Temporalio::Client::Schedule::Description.new( - input.id, - @client.workflow_service.describe_schedule( + id: input.id, + raw_description: @client.workflow_service.describe_schedule( Api::WorkflowService::V1::DescribeScheduleRequest.new( namespace: @client.namespace, schedule_id: input.id ), rpc_options: Implementation.with_default_rpc_options(input.rpc_options) ), - @client.data_converter + data_converter: @client.data_converter ) ) ) diff --git a/temporalio/lib/temporalio/retry_policy.rb b/temporalio/lib/temporalio/retry_policy.rb index b504717e..c248afc5 100644 --- a/temporalio/lib/temporalio/retry_policy.rb +++ b/temporalio/lib/temporalio/retry_policy.rb @@ -3,13 +3,12 @@ require 'temporalio/internal/proto_utils' module Temporalio - RetryPolicy = Struct.new( + RetryPolicy = Data.define( :initial_interval, :backoff_coefficient, :max_interval, :max_attempts, - :non_retryable_error_types, - keyword_init: true + :non_retryable_error_types ) # Options for retrying workflows and activities. diff --git a/temporalio/lib/temporalio/runtime.rb b/temporalio/lib/temporalio/runtime.rb index 972e72a0..fc33c713 100644 --- a/temporalio/lib/temporalio/runtime.rb +++ b/temporalio/lib/temporalio/runtime.rb @@ -12,10 +12,9 @@ module Temporalio # before any clients are created, and set it via {default=}. Every time a new runtime is created, a new internal Rust # thread pool is created. class Runtime - TelemetryOptions = Struct.new( + TelemetryOptions = Data.define( :logging, - :metrics, - keyword_init: true + :metrics ) # Telemetry options for the runtime. @@ -45,10 +44,9 @@ def _to_bridge end end - LoggingOptions = Struct.new( - :log_filter, + LoggingOptions = Data.define( + :log_filter # TODO(cretz): forward_to - keyword_init: true ) # Logging options for runtime telemetry. @@ -79,10 +77,9 @@ def _to_bridge end end - LoggingFilterOptions = Struct.new( + LoggingFilterOptions = Data.define( :core_level, - :other_level, - keyword_init: true + :other_level ) # Logging filter options for Core. @@ -107,13 +104,12 @@ def _to_bridge end end - MetricsOptions = Struct.new( + MetricsOptions = Data.define( :opentelemetry, :prometheus, :attach_service_name, :global_tags, - :metric_prefix, - keyword_init: true + :metric_prefix ) # Metrics options for runtime telemetry. Either {opentelemetry} or {prometheus} required, but not both. @@ -163,13 +159,12 @@ def _to_bridge end end - OpenTelemetryMetricsOptions = Struct.new( + OpenTelemetryMetricsOptions = Data.define( :url, :headers, :metric_periodicity, :metric_temporality, - :durations_as_seconds, - keyword_init: true + :durations_as_seconds ) # Options for exporting metrics to OpenTelemetry. @@ -228,12 +223,11 @@ def _to_bridge end end - PrometheusMetricsOptions = Struct.new( + PrometheusMetricsOptions = Data.define( :bind_address, :counters_total_suffix, :unit_suffix, - :durations_as_seconds, - keyword_init: true + :durations_as_seconds ) # Options for exporting metrics to Prometheus. diff --git a/temporalio/lib/temporalio/testing/workflow_environment.rb b/temporalio/lib/temporalio/testing/workflow_environment.rb index ea221bbb..668d9d81 100644 --- a/temporalio/lib/temporalio/testing/workflow_environment.rb +++ b/temporalio/lib/temporalio/testing/workflow_environment.rb @@ -256,8 +256,9 @@ def auto_time_skipping_disabled(&) class Ephemeral < WorkflowEnvironment def initialize(client, core_server, supports_time_skipping:) # Add our interceptor at the end of the existing interceptors that skips time - client_options = client.options.dup - client_options.interceptors += [TimeSkippingClientInterceptor.new(self)] + client_options = client.options.with( + interceptors: client.options.interceptors + [TimeSkippingClientInterceptor.new(self)] + ) client = Client.new(**client_options.to_h) # steep:ignore super(client) diff --git a/temporalio/lib/temporalio/worker.rb b/temporalio/lib/temporalio/worker.rb index 73998ffd..f19c30d4 100644 --- a/temporalio/lib/temporalio/worker.rb +++ b/temporalio/lib/temporalio/worker.rb @@ -23,8 +23,7 @@ module Temporalio # {run_all} is used for a collection of workers. These can wait until a block is complete or a {Cancellation} is # canceled. class Worker - # Options as returned from {options} for `**to_h`` splat use in {initialize}. See {initialize} for details. - Options = Struct.new( + Options = Data.define( :client, :task_queue, :activities, @@ -52,10 +51,12 @@ class Worker :illegal_workflow_calls, :workflow_failure_exception_types, :workflow_payload_codec_thread_pool, - :debug_mode, - keyword_init: true + :debug_mode ) + # Options as returned from {options} for `**to_h` splat use in {initialize}. See {initialize} for details. + class Options; end # rubocop:disable Lint/EmptyClass + # @return [String] Memoized default build ID. This default value is built as a checksum of all of the loaded Ruby # source files in `$LOADED_FEATURES`. Users may prefer to set the build ID to a better representation of the # source. diff --git a/temporalio/lib/temporalio/worker/interceptor.rb b/temporalio/lib/temporalio/worker/interceptor.rb index 9a6c7808..b5acc4a2 100644 --- a/temporalio/lib/temporalio/worker/interceptor.rb +++ b/temporalio/lib/temporalio/worker/interceptor.rb @@ -19,11 +19,10 @@ def intercept_activity(next_interceptor) end # Input for {Inbound.execute}. - ExecuteInput = Struct.new( + ExecuteInput = Data.define( :proc, :args, - :headers, - keyword_init: true + :headers ) # Inbound interceptor for intercepting inbound activity calls. This should be extended by users needing to @@ -59,9 +58,8 @@ def execute(input) end # Input for {Outbound.heartbeat}. - HeartbeatInput = Struct.new( - :details, - keyword_init: true + HeartbeatInput = Data.define( + :details ) # Outbound interceptor for intercepting outbound activity calls. This should be extended by users needing to @@ -102,39 +100,35 @@ def intercept_workflow(next_interceptor) end # Input for {Inbound.execute}. - ExecuteInput = Struct.new( + ExecuteInput = Data.define( :args, - :headers, - keyword_init: true + :headers ) # Input for {Inbound.handle_signal}. - HandleSignalInput = Struct.new( + HandleSignalInput = Data.define( :signal, :args, :definition, - :headers, - keyword_init: true + :headers ) # Input for {Inbound.handle_query}. - HandleQueryInput = Struct.new( + HandleQueryInput = Data.define( :id, :query, :args, :definition, - :headers, - keyword_init: true + :headers ) # Input for {Inbound.validate_update} and {Inbound.handle_update}. - HandleUpdateInput = Struct.new( + HandleUpdateInput = Data.define( :id, :update, :args, :definition, - :headers, - keyword_init: true + :headers ) # Inbound interceptor for intercepting inbound workflow calls. This should be extended by users needing to @@ -202,14 +196,13 @@ def handle_update(input) end # Input for {Outbound.cancel_external_workflow}. - CancelExternalWorkflowInput = Struct.new( + CancelExternalWorkflowInput = Data.define( :id, - :run_id, - keyword_init: true + :run_id ) # Input for {Outbound.execute_activity}. - ExecuteActivityInput = Struct.new( + ExecuteActivityInput = Data.define( :activity, :args, :task_queue, @@ -222,12 +215,11 @@ def handle_update(input) :cancellation_type, :activity_id, :disable_eager_execution, - :headers, - keyword_init: true + :headers ) # Input for {Outbound.execute_local_activity}. - ExecuteLocalActivityInput = Struct.new( + ExecuteLocalActivityInput = Data.define( :activity, :args, :schedule_to_close_timeout, @@ -238,47 +230,42 @@ def handle_update(input) :cancellation, :cancellation_type, :activity_id, - :headers, - keyword_init: true + :headers ) # Input for {Outbound.initialize_continue_as_new_error}. - InitializeContinueAsNewErrorInput = Struct.new( - :error, - keyword_init: true + InitializeContinueAsNewErrorInput = Data.define( + :error ) # Input for {Outbound.signal_child_workflow}. - SignalChildWorkflowInput = Struct.new( + SignalChildWorkflowInput = Data.define( :id, :signal, :args, :cancellation, - :headers, - keyword_init: true + :headers ) # Input for {Outbound.signal_external_workflow}. - SignalExternalWorkflowInput = Struct.new( + SignalExternalWorkflowInput = Data.define( :id, :run_id, :signal, :args, :cancellation, - :headers, - keyword_init: true + :headers ) # Input for {Outbound.sleep}. - SleepInput = Struct.new( + SleepInput = Data.define( :duration, :summary, - :cancellation, - keyword_init: true + :cancellation ) # Input for {Outbound.start_child_workflow}. - StartChildWorkflowInput = Struct.new( + StartChildWorkflowInput = Data.define( :workflow, :args, :id, @@ -294,8 +281,7 @@ def handle_update(input) :cron_schedule, :memo, :search_attributes, - :headers, - keyword_init: true + :headers ) # Outbound interceptor for intercepting outbound workflow calls. This should be extended by users needing to diff --git a/temporalio/sig/temporalio/activity/info.rbs b/temporalio/sig/temporalio/activity/info.rbs index 07b6465b..2f0c0cdd 100644 --- a/temporalio/sig/temporalio/activity/info.rbs +++ b/temporalio/sig/temporalio/activity/info.rbs @@ -38,6 +38,8 @@ module Temporalio workflow_run_id: String, workflow_type: String ) -> void + + def with: (**untyped) -> Info end end end \ No newline at end of file diff --git a/temporalio/sig/temporalio/client.rbs b/temporalio/sig/temporalio/client.rbs index c3ae4539..2e07b373 100644 --- a/temporalio/sig/temporalio/client.rbs +++ b/temporalio/sig/temporalio/client.rbs @@ -1,12 +1,12 @@ module Temporalio class Client class Options - attr_accessor connection: Connection - attr_accessor namespace: String - attr_accessor data_converter: Converters::DataConverter - attr_accessor interceptors: Array[Interceptor] - attr_accessor logger: Logger - attr_accessor default_workflow_query_reject_condition: WorkflowQueryRejectCondition::enum? + attr_reader connection: Connection + attr_reader namespace: String + attr_reader data_converter: Converters::DataConverter + attr_reader interceptors: Array[Interceptor] + attr_reader logger: Logger + attr_reader default_workflow_query_reject_condition: WorkflowQueryRejectCondition::enum? def initialize: ( connection: Connection, @@ -18,6 +18,8 @@ module Temporalio ) -> void def to_h: -> Hash[Symbol, untyped] + + def with: (**untyped) -> Options end def self.connect: ( diff --git a/temporalio/sig/temporalio/client/connection.rbs b/temporalio/sig/temporalio/client/connection.rbs index a7475fa6..e67c6dcc 100644 --- a/temporalio/sig/temporalio/client/connection.rbs +++ b/temporalio/sig/temporalio/client/connection.rbs @@ -2,16 +2,16 @@ module Temporalio class Client class Connection class Options - attr_accessor target_host: String - attr_accessor api_key: String? - attr_accessor tls: bool | Connection::TLSOptions - attr_accessor rpc_metadata: Hash[String, String] - attr_accessor rpc_retry: RPCRetryOptions - attr_accessor identity: String - attr_accessor keep_alive: KeepAliveOptions - attr_accessor http_connect_proxy: HTTPConnectProxyOptions - attr_accessor runtime: Runtime - attr_accessor lazy_connect: bool + attr_reader target_host: String + attr_reader api_key: String? + attr_reader tls: bool | Connection::TLSOptions + attr_reader rpc_metadata: Hash[String, String] + attr_reader rpc_retry: RPCRetryOptions + attr_reader identity: String + attr_reader keep_alive: KeepAliveOptions + attr_reader http_connect_proxy: HTTPConnectProxyOptions + attr_reader runtime: Runtime + attr_reader lazy_connect: bool def initialize: ( target_host: String, @@ -25,13 +25,17 @@ module Temporalio runtime: Runtime, lazy_connect: bool ) -> void + + def to_h: -> Hash[Symbol, untyped] + + def with: (**untyped) -> Options end class TLSOptions - attr_accessor client_cert: String? - attr_accessor client_private_key: String? - attr_accessor server_root_ca_cert: String? - attr_accessor domain: String? + attr_reader client_cert: String? + attr_reader client_private_key: String? + attr_reader server_root_ca_cert: String? + attr_reader domain: String? def initialize: ( ?client_cert: String?, @@ -42,12 +46,12 @@ module Temporalio end class RPCRetryOptions - attr_accessor initial_interval: Float - attr_accessor randomization_factor: Float - attr_accessor multiplier: Float - attr_accessor max_interval: Float - attr_accessor max_elapsed_time: Float - attr_accessor max_retries: Integer + attr_reader initial_interval: Float + attr_reader randomization_factor: Float + attr_reader multiplier: Float + attr_reader max_interval: Float + attr_reader max_elapsed_time: Float + attr_reader max_retries: Integer def initialize: ( ?initial_interval: Float, @@ -60,8 +64,8 @@ module Temporalio end class KeepAliveOptions - attr_accessor interval: Float - attr_accessor timeout: Float + attr_reader interval: Float + attr_reader timeout: Float def initialize: ( ?interval: Float, @@ -70,9 +74,9 @@ module Temporalio end class HTTPConnectProxyOptions - attr_accessor target_host: String - attr_accessor basic_auth_user: String? - attr_accessor basic_auth_pass: String? + attr_reader target_host: String + attr_reader basic_auth_user: String? + attr_reader basic_auth_pass: String? def initialize: ( target_host: String, diff --git a/temporalio/sig/temporalio/client/interceptor.rbs b/temporalio/sig/temporalio/client/interceptor.rbs index 07f59933..d3522f65 100644 --- a/temporalio/sig/temporalio/client/interceptor.rbs +++ b/temporalio/sig/temporalio/client/interceptor.rbs @@ -4,23 +4,23 @@ module Temporalio def intercept_client: (Outbound next_interceptor) -> Outbound class StartWorkflowInput - attr_accessor workflow: singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor workflow_id: String - attr_accessor task_queue: String - attr_accessor execution_timeout: duration? - attr_accessor run_timeout: duration? - attr_accessor task_timeout: duration? - attr_accessor id_reuse_policy: WorkflowIDReusePolicy::enum - attr_accessor id_conflict_policy: WorkflowIDConflictPolicy::enum - attr_accessor retry_policy: RetryPolicy? - attr_accessor cron_schedule: String? - attr_accessor memo: Hash[String | Symbol, Object?]? - attr_accessor search_attributes: SearchAttributes? - attr_accessor start_delay: duration? - attr_accessor request_eager_start: bool - attr_accessor headers: Hash[String, Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader workflow: singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String + attr_reader args: Array[Object?] + attr_reader workflow_id: String + attr_reader task_queue: String + attr_reader execution_timeout: duration? + attr_reader run_timeout: duration? + attr_reader task_timeout: duration? + attr_reader id_reuse_policy: WorkflowIDReusePolicy::enum + attr_reader id_conflict_policy: WorkflowIDConflictPolicy::enum + attr_reader retry_policy: RetryPolicy? + attr_reader cron_schedule: String? + attr_reader memo: Hash[String | Symbol, Object?]? + attr_reader search_attributes: SearchAttributes? + attr_reader start_delay: duration? + attr_reader request_eager_start: bool + attr_reader headers: Hash[String, Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( workflow: singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String, @@ -44,8 +44,8 @@ module Temporalio end class ListWorkflowsInput - attr_accessor query: String? - attr_accessor rpc_options: RPCOptions? + attr_reader query: String? + attr_reader rpc_options: RPCOptions? def initialize: ( query: String?, @@ -54,8 +54,8 @@ module Temporalio end class CountWorkflowsInput - attr_accessor query: String? - attr_accessor rpc_options: RPCOptions? + attr_reader query: String? + attr_reader rpc_options: RPCOptions? def initialize: ( query: String?, @@ -64,9 +64,9 @@ module Temporalio end class DescribeWorkflowInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -76,12 +76,12 @@ module Temporalio end class FetchWorkflowHistoryEventsInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor wait_new_event: bool - attr_accessor event_filter_type: Integer - attr_accessor skip_archival: bool - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader wait_new_event: bool + attr_reader event_filter_type: Integer + attr_reader skip_archival: bool + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -94,12 +94,12 @@ module Temporalio end class SignalWorkflowInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor signal: Workflow::Definition::Signal | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor headers: Hash[String, Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader signal: Workflow::Definition::Signal | Symbol | String + attr_reader args: Array[Object?] + attr_reader headers: Hash[String, Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -112,13 +112,13 @@ module Temporalio end class QueryWorkflowInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor query: Workflow::Definition::Query | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor reject_condition: WorkflowQueryRejectCondition::enum? - attr_accessor headers: Hash[String, Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader query: Workflow::Definition::Query | Symbol | String + attr_reader args: Array[Object?] + attr_reader reject_condition: WorkflowQueryRejectCondition::enum? + attr_reader headers: Hash[String, Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -132,14 +132,14 @@ module Temporalio end class StartWorkflowUpdateInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor update_id: String - attr_accessor update: Workflow::Definition::Update | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor wait_for_stage: WorkflowUpdateWaitStage::enum - attr_accessor headers: Hash[String, Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader update_id: String + attr_reader update: Workflow::Definition::Update | Symbol | String + attr_reader args: Array[Object?] + attr_reader wait_for_stage: WorkflowUpdateWaitStage::enum + attr_reader headers: Hash[String, Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -154,10 +154,10 @@ module Temporalio end class PollWorkflowUpdateInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor update_id: String - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader update_id: String + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -168,10 +168,10 @@ module Temporalio end class CancelWorkflowInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor first_execution_run_id: String? - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader first_execution_run_id: String? + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -182,12 +182,12 @@ module Temporalio end class TerminateWorkflowInput - attr_accessor workflow_id: String - attr_accessor run_id: String? - attr_accessor first_execution_run_id: String? - attr_accessor reason: String? - attr_accessor details: Array[Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader workflow_id: String + attr_reader run_id: String? + attr_reader first_execution_run_id: String? + attr_reader reason: String? + attr_reader details: Array[Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( workflow_id: String, @@ -200,13 +200,13 @@ module Temporalio end class CreateScheduleInput - attr_accessor id: String - attr_accessor schedule: Schedule - attr_accessor trigger_immediately: bool - attr_accessor backfills: Array[Schedule::Backfill] - attr_accessor memo: Hash[String | Symbol, Object?]? - attr_accessor search_attributes: SearchAttributes? - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader schedule: Schedule + attr_reader trigger_immediately: bool + attr_reader backfills: Array[Schedule::Backfill] + attr_reader memo: Hash[String | Symbol, Object?]? + attr_reader search_attributes: SearchAttributes? + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -220,8 +220,8 @@ module Temporalio end class ListSchedulesInput - attr_accessor query: String? - attr_accessor rpc_options: RPCOptions? + attr_reader query: String? + attr_reader rpc_options: RPCOptions? def initialize: ( query: String?, @@ -230,9 +230,9 @@ module Temporalio end class BackfillScheduleInput - attr_accessor id: String - attr_accessor backfills: Array[Schedule::Backfill] - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader backfills: Array[Schedule::Backfill] + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -242,8 +242,8 @@ module Temporalio end class DeleteScheduleInput - attr_accessor id: String - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -252,8 +252,8 @@ module Temporalio end class DescribeScheduleInput - attr_accessor id: String - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -262,9 +262,9 @@ module Temporalio end class PauseScheduleInput - attr_accessor id: String - attr_accessor note: String - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader note: String + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -274,9 +274,9 @@ module Temporalio end class TriggerScheduleInput - attr_accessor id: String - attr_accessor overlap: Schedule::OverlapPolicy::enum? - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader overlap: Schedule::OverlapPolicy::enum? + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -286,9 +286,9 @@ module Temporalio end class UnpauseScheduleInput - attr_accessor id: String - attr_accessor note: String - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader note: String + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -298,9 +298,9 @@ module Temporalio end class UpdateScheduleInput - attr_accessor id: String - attr_accessor updater: ^(Schedule::Update::Input) -> Schedule::Update? - attr_accessor rpc_options: RPCOptions? + attr_reader id: String + attr_reader updater: ^(Schedule::Update::Input) -> Schedule::Update? + attr_reader rpc_options: RPCOptions? def initialize: ( id: String, @@ -310,9 +310,9 @@ module Temporalio end class HeartbeatAsyncActivityInput - attr_accessor task_token_or_id_reference: String | ActivityIDReference - attr_accessor details: Array[Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader task_token_or_id_reference: String | ActivityIDReference + attr_reader details: Array[Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( task_token_or_id_reference: String | ActivityIDReference, @@ -322,9 +322,9 @@ module Temporalio end class CompleteAsyncActivityInput - attr_accessor task_token_or_id_reference: String | ActivityIDReference - attr_accessor result: Object? - attr_accessor rpc_options: RPCOptions? + attr_reader task_token_or_id_reference: String | ActivityIDReference + attr_reader result: Object? + attr_reader rpc_options: RPCOptions? def initialize: ( task_token_or_id_reference: String | ActivityIDReference, @@ -334,10 +334,10 @@ module Temporalio end class FailAsyncActivityInput - attr_accessor task_token_or_id_reference: String | ActivityIDReference - attr_accessor error: Exception - attr_accessor last_heartbeat_details: Array[Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader task_token_or_id_reference: String | ActivityIDReference + attr_reader error: Exception + attr_reader last_heartbeat_details: Array[Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( task_token_or_id_reference: String | ActivityIDReference, @@ -348,9 +348,9 @@ module Temporalio end class ReportCancellationAsyncActivityInput - attr_accessor task_token_or_id_reference: String | ActivityIDReference - attr_accessor details: Array[Object?] - attr_accessor rpc_options: RPCOptions? + attr_reader task_token_or_id_reference: String | ActivityIDReference + attr_reader details: Array[Object?] + attr_reader rpc_options: RPCOptions? def initialize: ( task_token_or_id_reference: String | ActivityIDReference, diff --git a/temporalio/sig/temporalio/client/schedule.rbs b/temporalio/sig/temporalio/client/schedule.rbs index 2d22ac91..43f8bfce 100644 --- a/temporalio/sig/temporalio/client/schedule.rbs +++ b/temporalio/sig/temporalio/client/schedule.rbs @@ -1,10 +1,10 @@ module Temporalio class Client class Schedule - attr_accessor action: Action - attr_accessor spec: Spec - attr_accessor policy: Policy - attr_accessor state: State + attr_reader action: Action + attr_reader spec: Spec + attr_reader policy: Policy + attr_reader state: State def self._from_proto: ( untyped raw_schedule, @@ -20,16 +20,18 @@ module Temporalio def _to_proto: (Converters::DataConverter data_converter) -> untyped + def with: (**untyped) -> Schedule + class Description - attr_accessor id: String - attr_accessor schedule: Schedule - attr_accessor info: Schedule::Info - attr_accessor raw_description: untyped + attr_reader id: String + attr_reader schedule: Schedule + attr_reader info: Schedule::Info + attr_reader raw_description: untyped def initialize: ( - String id, - untyped raw_description, - Converters::DataConverter data_converter + id: String, + raw_description: untyped, + data_converter: Converters::DataConverter ) -> void def memo: -> Hash[String, Object?]? @@ -37,16 +39,16 @@ module Temporalio end class Info - attr_accessor num_actions: Integer - attr_accessor num_actions_missed_catchup_window: Integer - attr_accessor num_actions_skipped_overlap: Integer - attr_accessor running_actions: Array[ActionExecution] - attr_accessor recent_actions: Array[ActionResult] - attr_accessor next_action_times: Array[Time] - attr_accessor created_at: Time - attr_accessor last_updated_at: Time? - - def initialize: (untyped raw_info) -> void + attr_reader num_actions: Integer + attr_reader num_actions_missed_catchup_window: Integer + attr_reader num_actions_skipped_overlap: Integer + attr_reader running_actions: Array[ActionExecution] + attr_reader recent_actions: Array[ActionResult] + attr_reader next_action_times: Array[Time] + attr_reader created_at: Time + attr_reader last_updated_at: Time? + + def initialize: (raw_info: untyped) -> void end module Action @@ -60,24 +62,19 @@ module Temporalio class StartWorkflow include Action - attr_accessor workflow: singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor id: String - attr_accessor task_queue: String - attr_accessor execution_timeout: duration? - attr_accessor run_timeout: duration? - attr_accessor task_timeout: duration? - attr_accessor retry_policy: RetryPolicy? - attr_accessor memo: Hash[String, Object?]? - attr_accessor search_attributes: SearchAttributes? - attr_accessor headers: Hash[String, Object?]? - - def self._from_proto: ( - untyped raw_info, - Converters::DataConverter data_converter - ) -> StartWorkflow - - def initialize: ( + attr_reader workflow: singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String + attr_reader args: Array[Object?] + attr_reader id: String + attr_reader task_queue: String + attr_reader execution_timeout: duration? + attr_reader run_timeout: duration? + attr_reader task_timeout: duration? + attr_reader retry_policy: RetryPolicy? + attr_reader memo: Hash[String, Object?]? + attr_reader search_attributes: SearchAttributes? + attr_reader headers: Hash[String, Object?]? + + def self.new: ( singleton(Workflow::Definition) | Workflow::Definition::Info | Symbol | String workflow, *Object? args, id: String, @@ -89,7 +86,14 @@ module Temporalio ?memo: Hash[String, Object?]?, ?search_attributes: SearchAttributes?, ?headers: Hash[String, Object?]? - ) -> void + ) -> StartWorkflow + + def self._from_proto: ( + untyped raw_info, + Converters::DataConverter data_converter + ) -> StartWorkflow + + def with: (**untyped) -> StartWorkflow def _to_proto: (Converters::DataConverter data_converter) -> untyped end @@ -107,9 +111,9 @@ module Temporalio end class Backfill - attr_accessor start_at: Time - attr_accessor end_at: Time - attr_accessor overlap: OverlapPolicy::enum? + attr_reader start_at: Time + attr_reader end_at: Time + attr_reader overlap: OverlapPolicy::enum? def initialize: ( start_at: Time, @@ -124,30 +128,30 @@ module Temporalio class StartWorkflow include ActionExecution - attr_accessor workflow_id: String - attr_accessor first_execution_run_id: String + attr_reader workflow_id: String + attr_reader first_execution_run_id: String - def initialize: (untyped raw_execution) -> void + def initialize: (raw_execution: untyped) -> void end end class ActionResult - attr_accessor schedule_at: Time - attr_accessor started_at: Time - attr_accessor action: ActionExecution + attr_reader schedule_at: Time + attr_reader started_at: Time + attr_reader action: ActionExecution - def initialize: (untyped raw_result) -> void + def initialize: (raw_result: untyped) -> void end class Spec - attr_accessor calendars: Array[Calendar] - attr_accessor intervals: Array[Interval] - attr_accessor cron_expressions: Array[String] - attr_accessor skip: Array[Calendar] - attr_accessor start_at: Time? - attr_accessor end_at: Time? - attr_accessor jitter: Float? - attr_accessor time_zone_name: String? + attr_reader calendars: Array[Calendar] + attr_reader intervals: Array[Interval] + attr_reader cron_expressions: Array[String] + attr_reader skip: Array[Calendar] + attr_reader start_at: Time? + attr_reader end_at: Time? + attr_reader jitter: Float? + attr_reader time_zone_name: String? def self._from_proto: (untyped raw_spec) -> Spec @@ -164,15 +168,17 @@ module Temporalio def _to_proto: -> untyped + def with: (**untyped) -> Spec + class Calendar - attr_accessor second: Array[Schedule::Range] - attr_accessor minute: Array[Schedule::Range] - attr_accessor hour: Array[Schedule::Range] - attr_accessor day_of_month: Array[Schedule::Range] - attr_accessor month: Array[Schedule::Range] - attr_accessor year: Array[Schedule::Range] - attr_accessor day_of_week: Array[Schedule::Range] - attr_accessor comment: String? + attr_reader second: Array[Schedule::Range] + attr_reader minute: Array[Schedule::Range] + attr_reader hour: Array[Schedule::Range] + attr_reader day_of_month: Array[Schedule::Range] + attr_reader month: Array[Schedule::Range] + attr_reader year: Array[Schedule::Range] + attr_reader day_of_week: Array[Schedule::Range] + attr_reader comment: String? def self._from_proto: (untyped raw_cal) -> Calendar @@ -191,8 +197,8 @@ module Temporalio end class Interval - attr_accessor every: duration - attr_accessor offset: duration? + attr_reader every: duration + attr_reader offset: duration? def self._from_proto: (untyped raw_int) -> Interval @@ -206,27 +212,27 @@ module Temporalio end class Range - attr_accessor start: Integer - attr_accessor finish: Integer - attr_accessor step: Integer - - def self._from_proto: (untyped raw_range) -> Range - def self._from_protos: (Array[untyped] raw_ranges) -> Array[Range] - def self._to_protos: (Array[Range] ranges) -> Array[untyped] + attr_reader start: Integer + attr_reader finish: Integer + attr_reader step: Integer - def initialize: ( + def self.new: ( Integer start, ?Integer finish, ?Integer step - ) -> void + ) -> Range + + def self._from_proto: (untyped raw_range) -> Range + def self._from_protos: (Array[untyped] raw_ranges) -> Array[Range] + def self._to_protos: (Array[Range] ranges) -> Array[untyped] def _to_proto: -> untyped end class Policy - attr_accessor overlap: OverlapPolicy::enum - attr_accessor catchup_window: duration - attr_accessor pause_on_failure: bool + attr_reader overlap: OverlapPolicy::enum + attr_reader catchup_window: duration + attr_reader pause_on_failure: bool def self._from_proto: (untyped raw_policies) -> Policy @@ -240,10 +246,10 @@ module Temporalio end class State - attr_accessor note: String? - attr_accessor paused: bool - attr_accessor limited_actions: bool - attr_accessor remaining_actions: Integer + attr_reader note: String? + attr_reader paused: bool + attr_reader limited_actions: bool + attr_reader remaining_actions: Integer def self._from_proto: (untyped raw_state) -> State @@ -258,8 +264,8 @@ module Temporalio end class Update - attr_accessor schedule: Schedule - attr_accessor search_attributes: SearchAttributes? + attr_reader schedule: Schedule + attr_reader search_attributes: SearchAttributes? def initialize: ( schedule: Schedule, @@ -267,7 +273,7 @@ module Temporalio ) -> void class Input - attr_accessor description: Description + attr_reader description: Description def initialize: (description: Description) -> void end @@ -275,47 +281,47 @@ module Temporalio module List class Description - attr_accessor id: String - attr_accessor schedule: Schedule - attr_accessor info: Info - attr_accessor raw_entry: untyped + attr_reader id: String + attr_reader schedule: Schedule + attr_reader info: Info + attr_reader raw_entry: untyped def initialize: ( - untyped raw_entry, - Converters::DataConverter data_converter + raw_entry: untyped, + data_converter: Converters::DataConverter ) -> void end class Schedule - attr_accessor action: Action - attr_accessor spec: Spec - attr_accessor state: State + attr_reader action: Action + attr_reader spec: Spec + attr_reader state: State - def initialize: (untyped raw_info) -> void + def initialize: (raw_info: untyped) -> void end module Action class StartWorkflow include Action - attr_accessor workflow: String + attr_reader workflow: String - def initialize: (String workflow) -> void + def initialize: (workflow: String) -> void end end class Info - attr_accessor recent_actions: Array[ActionResult] - attr_accessor next_action_times: Array[Time] + attr_reader recent_actions: Array[ActionResult] + attr_reader next_action_times: Array[Time] - def initialize: (untyped raw_info) -> void + def initialize: (raw_info: untyped) -> void end class State - attr_accessor note: String? - attr_accessor paused: bool + attr_reader note: String? + attr_reader paused: bool - def initialize: (untyped raw_info) -> void + def initialize: (raw_info: untyped) -> void end end end diff --git a/temporalio/sig/temporalio/retry_policy.rbs b/temporalio/sig/temporalio/retry_policy.rbs index f357e26a..d8069113 100644 --- a/temporalio/sig/temporalio/retry_policy.rbs +++ b/temporalio/sig/temporalio/retry_policy.rbs @@ -1,10 +1,10 @@ module Temporalio class RetryPolicy - attr_accessor initial_interval: duration - attr_accessor backoff_coefficient: duration - attr_accessor max_interval: duration? - attr_accessor max_attempts: Integer - attr_accessor non_retryable_error_types: Array[String]? + attr_reader initial_interval: duration + attr_reader backoff_coefficient: duration + attr_reader max_interval: duration? + attr_reader max_attempts: Integer + attr_reader non_retryable_error_types: Array[String]? def self._from_proto: (untyped raw_policy) -> RetryPolicy diff --git a/temporalio/sig/temporalio/runtime.rbs b/temporalio/sig/temporalio/runtime.rbs index 9c974de0..f0f5a420 100644 --- a/temporalio/sig/temporalio/runtime.rbs +++ b/temporalio/sig/temporalio/runtime.rbs @@ -1,8 +1,8 @@ module Temporalio class Runtime class TelemetryOptions - attr_accessor logging: LoggingOptions? - attr_accessor metrics: MetricsOptions? + attr_reader logging: LoggingOptions? + attr_reader metrics: MetricsOptions? def initialize: ( ?logging: LoggingOptions?, @@ -13,7 +13,7 @@ module Temporalio end class LoggingOptions - attr_accessor log_filter: LoggingFilterOptions | String + attr_reader log_filter: LoggingFilterOptions | String def initialize: ( ?log_filter: LoggingFilterOptions | String @@ -25,8 +25,8 @@ module Temporalio type logging_filter_level = 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' class LoggingFilterOptions - attr_accessor core_level: logging_filter_level - attr_accessor other_level: logging_filter_level + attr_reader core_level: logging_filter_level + attr_reader other_level: logging_filter_level def initialize: ( ?core_level: logging_filter_level, @@ -37,11 +37,11 @@ module Temporalio end class MetricsOptions - attr_accessor opentelemetry: OpenTelemetryMetricsOptions? - attr_accessor prometheus: PrometheusMetricsOptions? - attr_accessor attach_service_name: bool - attr_accessor global_tags: Hash[String, String]? - attr_accessor metric_prefix: String? + attr_reader opentelemetry: OpenTelemetryMetricsOptions? + attr_reader prometheus: PrometheusMetricsOptions? + attr_reader attach_service_name: bool + attr_reader global_tags: Hash[String, String]? + attr_reader metric_prefix: String? def initialize: ( ?opentelemetry: OpenTelemetryMetricsOptions?, @@ -62,11 +62,11 @@ module Temporalio type enum = 1 | 2 end - attr_accessor url: String - attr_accessor headers: Hash[String, String]? - attr_accessor metric_periodicity: Float? - attr_accessor metric_temporality: MetricTemporality - attr_accessor durations_as_seconds: bool + attr_reader url: String + attr_reader headers: Hash[String, String]? + attr_reader metric_periodicity: Float? + attr_reader metric_temporality: MetricTemporality + attr_reader durations_as_seconds: bool def initialize: ( url: String, @@ -80,10 +80,10 @@ module Temporalio end class PrometheusMetricsOptions - attr_accessor bind_address: String - attr_accessor counters_total_suffix: bool - attr_accessor unit_suffix: bool - attr_accessor durations_as_seconds: bool + attr_reader bind_address: String + attr_reader counters_total_suffix: bool + attr_reader unit_suffix: bool + attr_reader durations_as_seconds: bool def initialize: ( bind_address: String, diff --git a/temporalio/sig/temporalio/worker.rbs b/temporalio/sig/temporalio/worker.rbs index 5f8cdbff..71cfdd60 100644 --- a/temporalio/sig/temporalio/worker.rbs +++ b/temporalio/sig/temporalio/worker.rbs @@ -1,34 +1,34 @@ module Temporalio class Worker class Options - attr_accessor client: Client - attr_accessor task_queue: String - attr_accessor activities: Array[Activity::Definition | singleton(Activity::Definition) | Activity::Definition::Info] - attr_accessor workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info] - attr_accessor tuner: Tuner - attr_accessor activity_executors: Hash[Symbol, Worker::ActivityExecutor] - attr_accessor workflow_executor: Worker::WorkflowExecutor - attr_accessor interceptors: Array[Interceptor::Activity | Interceptor::Workflow] - attr_accessor build_id: String - attr_accessor identity: String - attr_accessor logger: Logger - attr_accessor max_cached_workflows: Integer - attr_accessor max_concurrent_workflow_task_polls: Integer - attr_accessor nonsticky_to_sticky_poll_ratio: Float - attr_accessor max_concurrent_activity_task_polls: Integer - attr_accessor no_remote_activities: bool - attr_accessor sticky_queue_schedule_to_start_timeout: Float - attr_accessor max_heartbeat_throttle_interval: Float - attr_accessor default_heartbeat_throttle_interval: Float - attr_accessor max_activities_per_second: Float? - attr_accessor max_task_queue_activities_per_second: Float? - attr_accessor graceful_shutdown_period: Float - attr_accessor use_worker_versioning: bool - attr_accessor disable_eager_activity_execution: bool - attr_accessor illegal_workflow_calls: Hash[String, :all | Array[Symbol]] - attr_accessor workflow_failure_exception_types: Array[singleton(Exception)] - attr_accessor workflow_payload_codec_thread_pool: ThreadPool? - attr_accessor debug_mode: bool + attr_reader client: Client + attr_reader task_queue: String + attr_reader activities: Array[Activity::Definition | singleton(Activity::Definition) | Activity::Definition::Info] + attr_reader workflows: Array[singleton(Workflow::Definition) | Workflow::Definition::Info] + attr_reader tuner: Tuner + attr_reader activity_executors: Hash[Symbol, Worker::ActivityExecutor] + attr_reader workflow_executor: Worker::WorkflowExecutor + attr_reader interceptors: Array[Interceptor::Activity | Interceptor::Workflow] + attr_reader build_id: String + attr_reader identity: String + attr_reader logger: Logger + attr_reader max_cached_workflows: Integer + attr_reader max_concurrent_workflow_task_polls: Integer + attr_reader nonsticky_to_sticky_poll_ratio: Float + attr_reader max_concurrent_activity_task_polls: Integer + attr_reader no_remote_activities: bool + attr_reader sticky_queue_schedule_to_start_timeout: Float + attr_reader max_heartbeat_throttle_interval: Float + attr_reader default_heartbeat_throttle_interval: Float + attr_reader max_activities_per_second: Float? + attr_reader max_task_queue_activities_per_second: Float? + attr_reader graceful_shutdown_period: Float + attr_reader use_worker_versioning: bool + attr_reader disable_eager_activity_execution: bool + attr_reader illegal_workflow_calls: Hash[String, :all | Array[Symbol]] + attr_reader workflow_failure_exception_types: Array[singleton(Exception)] + attr_reader workflow_payload_codec_thread_pool: ThreadPool? + attr_reader debug_mode: bool def initialize: ( client: Client, diff --git a/temporalio/sig/temporalio/worker/interceptor.rbs b/temporalio/sig/temporalio/worker/interceptor.rbs index 5c929e47..702a0d73 100644 --- a/temporalio/sig/temporalio/worker/interceptor.rbs +++ b/temporalio/sig/temporalio/worker/interceptor.rbs @@ -5,9 +5,9 @@ module Temporalio def intercept_activity: (Inbound next_interceptor) -> Inbound class ExecuteInput - attr_accessor proc: Proc - attr_accessor args: Array[Object?] - attr_accessor headers: Hash[String, Object?] + attr_reader proc: Proc + attr_reader args: Array[Object?] + attr_reader headers: Hash[String, Object?] def initialize: ( proc: Proc, @@ -27,7 +27,7 @@ module Temporalio end class HeartbeatInput - attr_accessor details: Array[Object?] + attr_reader details: Array[Object?] def initialize: (details: Array[Object?]) -> void end @@ -45,8 +45,8 @@ module Temporalio def intercept_workflow: (Inbound next_interceptor) -> Inbound class ExecuteInput - attr_accessor args: Array[Object?] - attr_accessor headers: Hash[String, Object?] + attr_reader args: Array[Object?] + attr_reader headers: Hash[String, Object?] def initialize: ( args: Array[Object?], @@ -55,10 +55,10 @@ module Temporalio end class HandleSignalInput - attr_accessor signal: String - attr_accessor args: Array[Object?] - attr_accessor definition: Temporalio::Workflow::Definition::Signal - attr_accessor headers: Hash[String, Object?] + attr_reader signal: String + attr_reader args: Array[Object?] + attr_reader definition: Temporalio::Workflow::Definition::Signal + attr_reader headers: Hash[String, Object?] def initialize: ( signal: String, @@ -69,11 +69,11 @@ module Temporalio end class HandleQueryInput - attr_accessor id: String - attr_accessor query: String - attr_accessor args: Array[Object?] - attr_accessor definition: Temporalio::Workflow::Definition::Query - attr_accessor headers: Hash[String, Object?] + attr_reader id: String + attr_reader query: String + attr_reader args: Array[Object?] + attr_reader definition: Temporalio::Workflow::Definition::Query + attr_reader headers: Hash[String, Object?] def initialize: ( id: String, @@ -85,11 +85,11 @@ module Temporalio end class HandleUpdateInput - attr_accessor id: String - attr_accessor update: String - attr_accessor args: Array[Object?] - attr_accessor definition: Temporalio::Workflow::Definition::Update - attr_accessor headers: Hash[String, Object?] + attr_reader id: String + attr_reader update: String + attr_reader args: Array[Object?] + attr_reader definition: Temporalio::Workflow::Definition::Update + attr_reader headers: Hash[String, Object?] def initialize: ( id: String, @@ -119,8 +119,8 @@ module Temporalio end class CancelExternalWorkflowInput - attr_accessor id: String - attr_accessor run_id: String? + attr_reader id: String + attr_reader run_id: String? def initialize: ( id: String, @@ -129,19 +129,19 @@ module Temporalio end class ExecuteActivityInput - attr_accessor activity: singleton(Temporalio::Activity::Definition) | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor task_queue: String - attr_accessor schedule_to_close_timeout: duration? - attr_accessor schedule_to_start_timeout: duration? - attr_accessor start_to_close_timeout: duration? - attr_accessor heartbeat_timeout: duration? - attr_accessor retry_policy: RetryPolicy? - attr_accessor cancellation: Cancellation - attr_accessor cancellation_type: Temporalio::Workflow::ActivityCancellationType::enum - attr_accessor activity_id: String? - attr_accessor disable_eager_execution: bool - attr_accessor headers: Hash[String, Object?] + attr_reader activity: singleton(Temporalio::Activity::Definition) | Symbol | String + attr_reader args: Array[Object?] + attr_reader task_queue: String + attr_reader schedule_to_close_timeout: duration? + attr_reader schedule_to_start_timeout: duration? + attr_reader start_to_close_timeout: duration? + attr_reader heartbeat_timeout: duration? + attr_reader retry_policy: RetryPolicy? + attr_reader cancellation: Cancellation + attr_reader cancellation_type: Temporalio::Workflow::ActivityCancellationType::enum + attr_reader activity_id: String? + attr_reader disable_eager_execution: bool + attr_reader headers: Hash[String, Object?] def initialize: ( activity: singleton(Temporalio::Activity::Definition) | Symbol | String, @@ -161,17 +161,17 @@ module Temporalio end class ExecuteLocalActivityInput - attr_accessor activity: singleton(Temporalio::Activity::Definition) | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor schedule_to_close_timeout: duration? - attr_accessor schedule_to_start_timeout: duration? - attr_accessor start_to_close_timeout: duration? - attr_accessor retry_policy: RetryPolicy? - attr_accessor local_retry_threshold: duration? - attr_accessor cancellation: Cancellation - attr_accessor cancellation_type: Temporalio::Workflow::ActivityCancellationType::enum - attr_accessor activity_id: String? - attr_accessor headers: Hash[String, Object?] + attr_reader activity: singleton(Temporalio::Activity::Definition) | Symbol | String + attr_reader args: Array[Object?] + attr_reader schedule_to_close_timeout: duration? + attr_reader schedule_to_start_timeout: duration? + attr_reader start_to_close_timeout: duration? + attr_reader retry_policy: RetryPolicy? + attr_reader local_retry_threshold: duration? + attr_reader cancellation: Cancellation + attr_reader cancellation_type: Temporalio::Workflow::ActivityCancellationType::enum + attr_reader activity_id: String? + attr_reader headers: Hash[String, Object?] def initialize: ( activity: singleton(Temporalio::Activity::Definition) | Symbol | String, @@ -189,7 +189,7 @@ module Temporalio end class InitializeContinueAsNewErrorInput - attr_accessor error: Temporalio::Workflow::ContinueAsNewError + attr_reader error: Temporalio::Workflow::ContinueAsNewError def initialize: ( error: Temporalio::Workflow::ContinueAsNewError @@ -197,11 +197,11 @@ module Temporalio end class SignalChildWorkflowInput - attr_accessor id: String - attr_accessor signal: Temporalio::Workflow::Definition::Signal | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor cancellation: Cancellation - attr_accessor headers: Hash[String, Object?] + attr_reader id: String + attr_reader signal: Temporalio::Workflow::Definition::Signal | Symbol | String + attr_reader args: Array[Object?] + attr_reader cancellation: Cancellation + attr_reader headers: Hash[String, Object?] def initialize: ( id: String, @@ -213,12 +213,12 @@ module Temporalio end class SignalExternalWorkflowInput - attr_accessor id: String - attr_accessor run_id: String? - attr_accessor signal: Temporalio::Workflow::Definition::Signal | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor cancellation: Cancellation - attr_accessor headers: Hash[String, Object?] + attr_reader id: String + attr_reader run_id: String? + attr_reader signal: Temporalio::Workflow::Definition::Signal | Symbol | String + attr_reader args: Array[Object?] + attr_reader cancellation: Cancellation + attr_reader headers: Hash[String, Object?] def initialize: ( id: String, @@ -231,9 +231,9 @@ module Temporalio end class SleepInput - attr_accessor duration: duration? - attr_accessor summary: String? - attr_accessor cancellation: Cancellation + attr_reader duration: duration? + attr_reader summary: String? + attr_reader cancellation: Cancellation def initialize: ( duration: duration?, @@ -243,22 +243,22 @@ module Temporalio end class StartChildWorkflowInput - attr_accessor workflow: singleton(Temporalio::Workflow::Definition) | Temporalio::Workflow::Definition::Info | Symbol | String - attr_accessor args: Array[Object?] - attr_accessor id: String - attr_accessor task_queue: String - attr_accessor cancellation: Cancellation - attr_accessor cancellation_type: Temporalio::Workflow::ChildWorkflowCancellationType::enum - attr_accessor parent_close_policy: Temporalio::Workflow::ParentClosePolicy::enum - attr_accessor execution_timeout: duration? - attr_accessor run_timeout: duration? - attr_accessor task_timeout: duration? - attr_accessor id_reuse_policy: WorkflowIDReusePolicy::enum - attr_accessor retry_policy: RetryPolicy? - attr_accessor cron_schedule: String? - attr_accessor memo: Hash[String | Symbol, Object?]? - attr_accessor search_attributes: SearchAttributes? - attr_accessor headers: Hash[String, Object?] + attr_reader workflow: singleton(Temporalio::Workflow::Definition) | Temporalio::Workflow::Definition::Info | Symbol | String + attr_reader args: Array[Object?] + attr_reader id: String + attr_reader task_queue: String + attr_reader cancellation: Cancellation + attr_reader cancellation_type: Temporalio::Workflow::ChildWorkflowCancellationType::enum + attr_reader parent_close_policy: Temporalio::Workflow::ParentClosePolicy::enum + attr_reader execution_timeout: duration? + attr_reader run_timeout: duration? + attr_reader task_timeout: duration? + attr_reader id_reuse_policy: WorkflowIDReusePolicy::enum + attr_reader retry_policy: RetryPolicy? + attr_reader cron_schedule: String? + attr_reader memo: Hash[String | Symbol, Object?]? + attr_reader search_attributes: SearchAttributes? + attr_reader headers: Hash[String, Object?] def initialize: ( workflow: singleton(Temporalio::Workflow::Definition) | Temporalio::Workflow::Definition::Info | Symbol | String, diff --git a/temporalio/test/client_schedule_test.rb b/temporalio/test/client_schedule_test.rb index 1ffefaa4..ad5dc0d3 100644 --- a/temporalio/test/client_schedule_test.rb +++ b/temporalio/test/client_schedule_test.rb @@ -79,17 +79,18 @@ def test_basics # rubocop:disable Metrics/AbcSize,Metrics/MethodLength # We want to test the entire returned spec, policy, and state. But server # side spec turns the cron into a calendar, so we will replicate in our # expected spec. - expected_spec = schedule.spec.dup - expected_spec.cron_expressions = [] - expected_spec.calendars.push( - Temporalio::Client::Schedule::Spec::Calendar.new( - second: [Temporalio::Client::Schedule::Range.new(0)], - minute: [Temporalio::Client::Schedule::Range.new(0)], - hour: [Temporalio::Client::Schedule::Range.new(12)], - day_of_month: [Temporalio::Client::Schedule::Range.new(1, 31)], - month: [Temporalio::Client::Schedule::Range.new(1, 12)], - day_of_week: [Temporalio::Client::Schedule::Range.new(1)] - ) + expected_spec = schedule.spec.with( + cron_expressions: [], + calendars: schedule.spec.calendars + [ + Temporalio::Client::Schedule::Spec::Calendar.new( + second: [Temporalio::Client::Schedule::Range.new(0)], + minute: [Temporalio::Client::Schedule::Range.new(0)], + hour: [Temporalio::Client::Schedule::Range.new(12)], + day_of_month: [Temporalio::Client::Schedule::Range.new(1, 31)], + month: [Temporalio::Client::Schedule::Range.new(1, 12)], + day_of_week: [Temporalio::Client::Schedule::Range.new(1)] + ) + ] ) assert_equal expected_spec, desc.schedule.spec assert_equal schedule.policy, desc.schedule.policy @@ -98,9 +99,12 @@ def test_basics # rubocop:disable Metrics/AbcSize,Metrics/MethodLength # Update to just change schedule workflow's task timeout assert_nil desc_action.task_timeout handle.update do |input| - to_update = input.description.schedule.dup + to_update = input.description.schedule.with( + action: input.description.schedule.action.with( # steep:ignore + task_timeout: 4.56 + ) + ) assert_instance_of Temporalio::Client::Schedule::Action::StartWorkflow, to_update.action - to_update.action.task_timeout = 4.56 # steep:ignore Temporalio::Client::Schedule::Update.new(schedule: to_update) end desc = handle.describe diff --git a/temporalio/test/client_test.rb b/temporalio/test/client_test.rb index 4d3f7585..bf737639 100644 --- a/temporalio/test/client_test.rb +++ b/temporalio/test/client_test.rb @@ -105,8 +105,7 @@ def terminate_workflow(input) def test_interceptor # Create client with interceptor track = TrackCallsInterceptor.new - new_options = env.client.options.dup - new_options.interceptors = [track] + new_options = env.client.options.with(interceptors: [track]) client = Temporalio::Client.new(**new_options.to_h) # steep:ignore # Run a bunch of calls diff --git a/temporalio/test/client_workflow_test.rb b/temporalio/test/client_workflow_test.rb index 7c5db812..eb5618c7 100644 --- a/temporalio/test/client_workflow_test.rb +++ b/temporalio/test/client_workflow_test.rb @@ -323,8 +323,9 @@ def test_config_change assert_equal 'some query arg', handle.query('some query', 'some query arg') # Now demonstrate simple configuration change w/ default reject condition - new_options = env.client.options.dup - new_options.default_workflow_query_reject_condition = Temporalio::Client::WorkflowQueryRejectCondition::NOT_OPEN + new_options = env.client.options.with( + default_workflow_query_reject_condition: Temporalio::Client::WorkflowQueryRejectCondition::NOT_OPEN + ) new_client = Temporalio::Client.new(**new_options.to_h) # steep:ignore err = assert_raises(Temporalio::Error::WorkflowQueryRejectedError) do new_client.workflow_handle(handle.id).query('some query', 'some query arg') diff --git a/temporalio/test/runtime_test.rb b/temporalio/test/runtime_test.rb index 15f290f1..a73c524b 100644 --- a/temporalio/test/runtime_test.rb +++ b/temporalio/test/runtime_test.rb @@ -35,10 +35,10 @@ def test_metric_basics ) # Create a client on this runtime and start a non-existent workflow - conn_opts = env.client.connection.options.dup - conn_opts.runtime = runtime - client_opts = env.client.options.dup - client_opts.connection = Temporalio::Client::Connection.new(**conn_opts.to_h) # steep:ignore + conn_opts = env.client.connection.options.with(runtime:) + client_opts = env.client.options.with( + connection: Temporalio::Client::Connection.new(**conn_opts.to_h) # steep:ignore + ) client = Temporalio::Client.new(**client_opts.to_h) # steep:ignore client.start_workflow('bad-workflow', id: "bad-wf-#{SecureRandom.uuid}", task_queue: 'bad-task-queue') diff --git a/temporalio/test/testing/activity_environment_test.rb b/temporalio/test/testing/activity_environment_test.rb index e1d66e07..34bfa420 100644 --- a/temporalio/test/testing/activity_environment_test.rb +++ b/temporalio/test/testing/activity_environment_test.rb @@ -87,8 +87,7 @@ def execute def test_heartbeating queue = Queue.new - info = Temporalio::Testing::ActivityEnvironment.default_info.dup - info.activity_id = 'other-id' # steep:ignore + info = Temporalio::Testing::ActivityEnvironment.default_info.with(activity_id: 'other-id') env = Temporalio::Testing::ActivityEnvironment.new( info:, on_heartbeat: proc { |args| queue.push(args) } diff --git a/temporalio/test/worker_activity_test.rb b/temporalio/test/worker_activity_test.rb index 639452bc..2558e228 100644 --- a/temporalio/test/worker_activity_test.rb +++ b/temporalio/test/worker_activity_test.rb @@ -811,8 +811,7 @@ def test_interceptor def test_interceptor_from_client interceptor = TrackCallsInterceptor.new # Create new client with the interceptor set - new_options = env.client.options.dup - new_options.interceptors = [interceptor] + new_options = env.client.options.with(interceptors: [interceptor]) new_client = Temporalio::Client.new(**new_options.to_h) # steep:ignore assert_equal 'Hello, Temporal!', execute_activity(InterceptorActivity, 'Temporal', client: new_client) assert_equal 'activity_init', interceptor.calls[0].first diff --git a/temporalio/test/worker_workflow_test.rb b/temporalio/test/worker_workflow_test.rb index d9c2897f..ee017d4e 100644 --- a/temporalio/test/worker_workflow_test.rb +++ b/temporalio/test/worker_workflow_test.rb @@ -1030,8 +1030,9 @@ def test_payload_codec env.ensure_common_search_attribute_keys # Create a new client with the base64 codec - new_options = env.client.options.dup - new_options.data_converter = Temporalio::Converters::DataConverter.new(payload_codec: Base64Codec.new) + new_options = env.client.options.with( + data_converter: Temporalio::Converters::DataConverter.new(payload_codec: Base64Codec.new) + ) client = Temporalio::Client.new(**new_options.to_h) assert_encoded = lambda do |payload| assert_equal 'test/base64', payload.metadata['encoding'] @@ -1111,12 +1112,13 @@ def test_payload_codec end # Workflow failure with failure encoding - new_options = env.client.options.dup - new_options.data_converter = Temporalio::Converters::DataConverter.new( - failure_converter: Ractor.make_shareable( - Temporalio::Converters::FailureConverter.new(encode_common_attributes: true) - ), - payload_codec: Base64Codec.new + new_options = env.client.options.with( + data_converter: Temporalio::Converters::DataConverter.new( + failure_converter: Ractor.make_shareable( + Temporalio::Converters::FailureConverter.new(encode_common_attributes: true) + ), + payload_codec: Base64Codec.new + ) ) client = Temporalio::Client.new(**new_options.to_h) execute_workflow( @@ -1584,10 +1586,10 @@ def test_custom_metrics ) ) ) - conn_opts = env.client.connection.options.dup - conn_opts.runtime = runtime - client_opts = env.client.options.dup - client_opts.connection = Temporalio::Client::Connection.new(**conn_opts.to_h) # steep:ignore + conn_opts = env.client.connection.options.with(runtime:) + client_opts = env.client.options.with( + connection: Temporalio::Client::Connection.new(**conn_opts.to_h) + ) client = Temporalio::Client.new(**client_opts.to_h) # steep:ignore assert_equal 'done', execute_workflow( @@ -1667,9 +1669,10 @@ def do_update(arg) end def test_fail_workflow_payload_converter - new_options = env.client.options.dup - new_options.data_converter = Temporalio::Converters::DataConverter.new( - payload_converter: Ractor.make_shareable(FailWorkflowPayloadConverter.new) + new_options = env.client.options.with( + data_converter: Temporalio::Converters::DataConverter.new( + payload_converter: Ractor.make_shareable(FailWorkflowPayloadConverter.new) + ) ) client = Temporalio::Client.new(**new_options.to_h) From 6485b29401a9936a83f289b755d681f50a721166 Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Tue, 14 Jan 2025 17:19:07 -0600 Subject: [PATCH 3/3] Remove temporary build-gem trigger --- .github/workflows/build-gems.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-gems.yml b/.github/workflows/build-gems.yml index eb03c670..2c3d61e4 100644 --- a/.github/workflows/build-gems.yml +++ b/.github/workflows/build-gems.yml @@ -1,6 +1,5 @@ name: Build Gems on: - pull_request: push: branches: - main