Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 11 additions & 97 deletions packages/core-bridge/Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/core-bridge/sdk-core
Submodule sdk-core updated 76 files
+1 −1 .cargo/config.toml
+9 −4 .github/workflows/heavy.yml
+55 −54 .github/workflows/per-pr.yml
+1 −0 .gitignore
+1 −1 AGENTS.md
+1 −1 ARCHITECTURE.md
+5 −4 Cargo.toml
+21 −7 crates/client/Cargo.toml
+306 −0 crates/client/src/dns.rs
+12 −0 crates/client/src/errors.rs
+1 −0 crates/client/src/grpc.rs
+73 −14 crates/client/src/lib.rs
+28 −0 crates/client/src/options_structs.rs
+319 −4 crates/client/src/workflow_handle.rs
+17 −11 crates/common/Cargo.toml
+1 −0 crates/common/build.rs
+2 −2 crates/macros/Cargo.toml
+8 −8 crates/sdk-core-c-bridge/Cargo.toml
+7 −1 crates/sdk-core-c-bridge/src/client.rs
+1 −0 crates/sdk-core-c-bridge/src/worker.rs
+22 −18 crates/sdk-core/Cargo.toml
+1 −0 crates/sdk-core/src/core_tests/queries.rs
+112 −0 crates/sdk-core/src/core_tests/workers.rs
+2 −0 crates/sdk-core/src/core_tests/workflow_tasks.rs
+7 −7 crates/sdk-core/src/lib.rs
+95 −0 crates/sdk-core/src/pollers/mod.rs
+74 −43 crates/sdk-core/src/pollers/poll_buffer.rs
+5 −2 crates/sdk-core/src/test_help/integ_helpers.rs
+81 −52 crates/sdk-core/src/worker/activities.rs
+3 −0 crates/sdk-core/src/worker/client.rs
+98 −58 crates/sdk-core/src/worker/mod.rs
+11 −18 crates/sdk-core/src/worker/workflow/machines/transition_coverage.rs
+3 −1 crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs
+21 −32 crates/sdk-core/src/worker/workflow/mod.rs
+28 −12 crates/sdk-core/src/worker/workflow/wft_poller.rs
+5 −0 crates/sdk-core/tests/cloud_tests.rs
+1 −1 crates/sdk-core/tests/common/fake_grpc_server.rs
+4 −0 crates/sdk-core/tests/common/mod.rs
+1 −4 crates/sdk-core/tests/common/workflows.rs
+16 −24 crates/sdk-core/tests/heavy_tests.rs
+1 −4 crates/sdk-core/tests/heavy_tests/fuzzy_workflow.rs
+5 −7 crates/sdk-core/tests/integ_tests/async_activity_client_tests.rs
+4 −2 crates/sdk-core/tests/integ_tests/client_tests.rs
+176 −8 crates/sdk-core/tests/integ_tests/data_converter_tests.rs
+5 −7 crates/sdk-core/tests/integ_tests/heartbeat_tests.rs
+5 −10 crates/sdk-core/tests/integ_tests/metrics_tests.rs
+1 −4 crates/sdk-core/tests/integ_tests/polling_tests.rs
+4 −16 crates/sdk-core/tests/integ_tests/update_tests.rs
+64 −75 crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs
+20 −10 crates/sdk-core/tests/integ_tests/worker_tests.rs
+1 −4 crates/sdk-core/tests/integ_tests/worker_versioning_tests.rs
+6 −18 crates/sdk-core/tests/integ_tests/workflow_tests.rs
+35 −50 crates/sdk-core/tests/integ_tests/workflow_tests/activities.rs
+2 −2 crates/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs
+52 −2 crates/sdk-core/tests/integ_tests/workflow_tests/client_interactions.rs
+18 −14 crates/sdk-core/tests/integ_tests/workflow_tests/determinism.rs
+3 −5 crates/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs
+99 −23 crates/sdk-core/tests/integ_tests/workflow_tests/patches.rs
+170 −1 crates/sdk-core/tests/integ_tests/workflow_tests/queries.rs
+2 −8 crates/sdk-core/tests/manual_tests.rs
+121 −5 crates/sdk-core/tests/shared_tests/mod.rs
+5 −7 crates/sdk-core/tests/shared_tests/priority.rs
+11 −10 crates/sdk/Cargo.toml
+1 −4 crates/sdk/README.md
+3 −5 crates/sdk/examples/activity_heartbeating/workflows.rs
+4 −9 crates/sdk/examples/cancellation/workflows.rs
+1 −4 crates/sdk/examples/hello_world/workflows.rs
+1 −4 crates/sdk/examples/local_activities/workflows.rs
+1 −4 crates/sdk/examples/polling/workflows.rs
+1 −4 crates/sdk/examples/saga/workflows.rs
+1 −4 crates/sdk/examples/schedules/workflows.rs
+1 −4 crates/sdk/examples/timer_examples/workflows.rs
+8 −4 crates/sdk/src/lib.rs
+34 −3 crates/sdk/src/workflow_context.rs
+178 −41 crates/sdk/src/workflow_context/options.rs
+37 −10 crates/sdk/src/workflow_future.rs
10 changes: 9 additions & 1 deletion packages/core-bridge/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,20 @@ mod config {
metrics_meter: Option<TemporalMeter>,
) -> ConnectionOptions {
let (ascii_headers, bin_headers) = partition_headers(self.headers);
let http_connect_proxy = self.http_connect_proxy.map(Into::into);

ConnectionOptions::new(self.target_url)
.client_name(self.client_name)
.client_version(self.client_version)
.maybe_tls_options(self.tls.map(Into::into))
.maybe_http_connect_proxy(self.http_connect_proxy.map(Into::into))
.maybe_http_connect_proxy(http_connect_proxy)
// DNS load balancing is mutually exclusive with HTTP CONNECT proxy in sdk-core.
// Disable it when a proxy is configured; otherwise use the default.
.dns_load_balancing(if http_connect_proxy.is_some() {
Comment on lines +637 to +639
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, that was stupid of me wasn't it. Ofc this constitutes a breaking change because it defaults to on for any existing users using the connect proxy. 🤦‍♂️

None
} else {
Some(temporalio_client::DnsLoadBalancingOptions::default())
})
.maybe_headers(ascii_headers)
.maybe_binary_headers(bin_headers)
.maybe_api_key(self.api_key)
Expand Down
6 changes: 6 additions & 0 deletions packages/core-bridge/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ pub fn worker_complete_nexus_task(
#[js_function]
pub fn worker_initiate_shutdown(worker: OpaqueInboundHandle<Worker>) -> BridgeResult<()> {
let worker_ref = worker.borrow()?;

// Core worker shutdown now spawns a Tokio task, so this sync Neon binding must
// enter Core's Tokio runtime before initiating shutdown.
let runtime = worker_ref.core_runtime.clone();
enter_sync!(runtime);

worker_ref.core_worker.initiate_shutdown();
Ok(())
}
Expand Down
Loading