Skip to content
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
# Build and test the project
build-lint-test:
timeout-minutes: 30
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- 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
timeout-minutes: 20
# Time skipping doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
poe gen-protos
[[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1)
poe test -s --ignore=tests/contrib/google_adk_agents/
timeout-minutes: 10
timeout-minutes: 15

# Do docs stuff (only on one host)
- name: Build API docs
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"nexus-rpc==1.4.0",
"protobuf>=3.20,<7.0.0",
"python-dateutil>=2.8.2,<3 ; python_version < '3.11'",
"types-protobuf>=3.20",
"types-protobuf>=3.20,<7.0.0",
"typing-extensions>=4.2.0,<5",
]
classifiers = [
Expand Down Expand Up @@ -69,6 +69,7 @@ dev = [
"googleapis-common-protos==1.70.0",
"pytest-rerunfailures>=16.1",
"moto[s3,server]>=5",
"setuptools<82",
]

[tool.poe.tasks]
Expand Down
1 change: 1 addition & 0 deletions scripts/_proto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ VOLUME ["/api_new", "/bridge_new"]
COPY ./ ./

RUN mkdir -p ./temporalio/api
RUN uv remove google-adk --optional google-adk
RUN uv add "protobuf<4"
RUN uv sync --all-extras
RUN uv run scripts/gen_protos.py
Expand Down
42 changes: 33 additions & 9 deletions tests/worker/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Runtime,
TelemetryConfig,
)
from temporalio.service import RPCError
from temporalio.service import RPCError, RPCStatusCode
from temporalio.testing import WorkflowEnvironment
from temporalio.worker import (
ActivitySlotInfo,
Expand Down Expand Up @@ -1192,14 +1192,38 @@ async def mk_call() -> DescribeWorkerDeploymentResponse:
async def set_current_deployment_version(
client: Client, conflict_token: bytes, version: WorkerDeploymentVersion
) -> SetWorkerDeploymentCurrentVersionResponse:
return await client.workflow_service.set_worker_deployment_current_version(
SetWorkerDeploymentCurrentVersionRequest(
namespace=client.namespace,
deployment_name=version.deployment_name,
version=version.to_canonical_string(),
conflict_token=conflict_token,
)
)
async def mk_call() -> SetWorkerDeploymentCurrentVersionResponse:
nonlocal conflict_token
try:
return await client.workflow_service.set_worker_deployment_current_version(
SetWorkerDeploymentCurrentVersionRequest(
namespace=client.namespace,
deployment_name=version.deployment_name,
version=version.to_canonical_string(),
conflict_token=conflict_token,
)
)
except RPCError as err:
if err.status != RPCStatusCode.CANCELLED:
raise
describe_resp = await client.workflow_service.describe_worker_deployment(
DescribeWorkerDeploymentRequest(
namespace=client.namespace,
deployment_name=version.deployment_name,
)
)
current_version = describe_resp.worker_deployment_info.routing_config.current_deployment_version
if (
current_version.deployment_name == version.deployment_name
and current_version.build_id == version.build_id
):
return SetWorkerDeploymentCurrentVersionResponse(
conflict_token=describe_resp.conflict_token
)
conflict_token = describe_resp.conflict_token
assert False

return await assert_eventually(mk_call, retry_on_rpc_cancelled=False)


async def set_ramping_version(
Expand Down
Loading
Loading