Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
- run: uv sync --all-extras
- run: poe bridge-lint
if: ${{ matrix.clippyLinter }}
- run: poe lint
- run: poe build-develop
- run: poe lint
- run: mkdir junit-xml
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 15
Expand Down Expand Up @@ -153,8 +153,8 @@ jobs:
- run: uv tool install poethepoet
- run: uv lock --upgrade
- run: uv sync --all-extras
- run: poe lint
- run: poe build-develop
- run: poe lint
- run: mkdir junit-xml
- run: poe test -s --junit-xml=junit-xml/latest-deps.xml
timeout-minutes: 10
Expand Down
132 changes: 96 additions & 36 deletions temporalio/bridge/Cargo.lock

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

4 changes: 2 additions & 2 deletions temporalio/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ crate-type = ["cdylib"]
anyhow = "1.0"
async-trait = "0.1"
futures = "0.3"
prost = "0.13"
prost = "0.14"
pyo3 = { version = "0.25", features = [
"extension-module",
"abi3-py310",
Expand All @@ -38,7 +38,7 @@ temporal-sdk-core-api = { version = "0.1.0", path = "./sdk-core/core-api", featu
temporal-sdk-core-protos = { version = "0.1.0", path = "./sdk-core/sdk-core-protos" }
tokio = "1.26"
tokio-stream = "0.1"
tonic = "0.13"
tonic = "0.14"
tracing = "0.1"
url = "2.2"

Expand Down
12 changes: 10 additions & 2 deletions temporalio/bridge/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def _raise_in_thread(thread_id: int, exc_type: Type[BaseException]) -> bool:
thread_id, exc_type
)

def __init__(self, *, telemetry: TelemetryConfig) -> None:
def __init__(self, *, options: RuntimeOptions) -> None:
"""Create SDK Core runtime."""
self._ref = temporalio.bridge.temporal_sdk_bridge.init_runtime(telemetry)
self._ref = temporalio.bridge.temporal_sdk_bridge.init_runtime(options)

def retrieve_buffered_metrics(self, durations_as_seconds: bool) -> Sequence[Any]:
"""Get buffered metrics."""
Expand Down Expand Up @@ -91,6 +91,14 @@ class TelemetryConfig:
metrics: Optional[MetricsConfig]


@dataclass(frozen=True)
class RuntimeOptions:
"""Python representation of the Rust struct for runtime options."""

telemetry: TelemetryConfig
worker_heartbeat_interval_millis: Optional[int] = 60_000 # 60s


# WARNING: This must match Rust runtime::BufferedLogEntry
class BufferedLogEntry(Protocol):
"""A buffered log entry."""
Expand Down
2 changes: 1 addition & 1 deletion temporalio/bridge/sdk-core
Submodule sdk-core updated 364 files
Loading
Loading