Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,48 @@ jobs:
- run: poe lint
- run: poe build-develop
- run: mkdir junit-xml
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_custom_slot_supplier" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 5
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 15
# Time skipping doesn't yet support ARM
Expand Down
7 changes: 7 additions & 0 deletions temporalio/bridge/Cargo.lock

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

8 changes: 4 additions & 4 deletions temporalio/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ pyo3 = { version = "0.25", features = [
] }
pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime"] }
pythonize = "0.25"
temporal-client = { version = "0.1.0", path = "./sdk-core/client" }
temporal-sdk-core = { version = "0.1.0", path = "./sdk-core/core", features = [
temporal-client = { git = "https://github.com/temporalio/sdk-core", branch = "debug_slot_supplier" }
temporal-sdk-core = { git = "https://github.com/temporalio/sdk-core", branch = "debug_slot_supplier", features = [
"ephemeral-server",
] }
temporal-sdk-core-api = { version = "0.1.0", path = "./sdk-core/core-api", features = [
temporal-sdk-core-api = { git = "https://github.com/temporalio/sdk-core", branch = "debug_slot_supplier", features = [
"envconfig",
] }
temporal-sdk-core-protos = { version = "0.1.0", path = "./sdk-core/sdk-core-protos" }
temporal-sdk-core-protos = { git = "https://github.com/temporalio/sdk-core", branch = "debug_slot_supplier" }
tokio = "1.26"
tokio-stream = "0.1"
tonic = "0.13"
Expand Down
2 changes: 1 addition & 1 deletion temporalio/bridge/sdk-core
2 changes: 1 addition & 1 deletion temporalio/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _to_bridge_config(self) -> temporalio.bridge.runtime.LoggingConfig:


LoggingConfig.default = LoggingConfig(
filter=TelemetryFilter(core_level="WARN", other_level="ERROR")
filter=TelemetryFilter(core_level="DEBUG", other_level="ERROR")
)

_module_start_time = time.time()
Expand Down
15 changes: 15 additions & 0 deletions tests/worker/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import concurrent.futures
import logging
import uuid
from datetime import timedelta
from typing import Any, Awaitable, Callable, Optional, Sequence
Expand Down Expand Up @@ -64,6 +65,8 @@
with workflow.unsafe.imports_passed_through():
import pytest

logger = logging.getLogger(__name__)


def test_load_default_worker_binary_id():
# Just run it twice and confirm it didn't change
Expand Down Expand Up @@ -469,6 +472,12 @@ async def reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit:
# Verify an async call doesn't bungle things
await asyncio.sleep(0.01)
self.reserves += 1
logger.info(
"Reserve slot %d - %s - %s",
self.reserves,
ctx.slot_type,
ctx.task_queue,
)
return MyPermit(self.reserves)

def try_reserve_slot(self, ctx: SlotReserveContext) -> Optional[SlotPermit]:
Expand All @@ -494,6 +503,12 @@ def release_slot(self, ctx: SlotReleaseContext) -> None:
assert ctx.permit is not None
assert isinstance(ctx.permit, MyPermit)
assert ctx.permit.pnum is not None

logger.info(
"Release slot %d, %d",
ctx.permit.pnum,
self.highest_seen_reserve_on_release,
)
self.highest_seen_reserve_on_release = max(
ctx.permit.pnum, self.highest_seen_reserve_on_release
)
Expand Down
Loading