From 313ad58187f73858d5c3a9b3f8498cc51202683d Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Wed, 25 Jun 2025 08:46:09 -0700 Subject: [PATCH 01/10] Experimental CI entry to run tests with latest dependencies --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c208fc00..8e74eff02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: matrix: python: ["3.9", "3.13"] os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] + dependencies: ["locked"] include: # On 3.9 there is a problem with import errors caused by pytests' loader that surface due # to a bug in CPython (https://github.com/python/cpython/issues/91351), so we avoid using @@ -48,6 +49,9 @@ jobs: - os: windows-latest python: "3.13" pythonOverride: "3.13.4" + - os: ubuntu-latest + python: "3.13" + dependencies: "latest" runs-on: ${{ matrix.runsOn || matrix.os }} steps: - uses: actions/checkout@v4 @@ -67,6 +71,8 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: astral-sh/setup-uv@v5 - run: uv tool install poethepoet + - run: uv upgrade + if: ${{ matrix.dependencies == 'latest'}} - run: uv sync --all-extras - run: poe bridge-lint if: ${{ matrix.clippyLinter }} From 66637f8cbdb7e0336d7a4ab2d72765b296eee0dc Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Wed, 25 Jun 2025 08:53:05 -0700 Subject: [PATCH 02/10] Fix upgrade command --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e74eff02..99aa9b69c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: astral-sh/setup-uv@v5 - run: uv tool install poethepoet - - run: uv upgrade + - run: uv lock --upgrade if: ${{ matrix.dependencies == 'latest'}} - run: uv sync --all-extras - run: poe bridge-lint From 9bf6867d387a7f8c2feb608dfaa57369a352b5ef Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Wed, 25 Jun 2025 09:39:09 -0700 Subject: [PATCH 03/10] Further discriminate log names --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99aa9b69c..c43808fb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,15 +79,15 @@ jobs: - run: poe lint - run: poe build-develop - run: mkdir junit-xml - - run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + - run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }}.xml timeout-minutes: 10 # 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 + run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }}--time-skipping.xml timeout-minutes: 10 # Check cloud if proper target and not on fork - if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} - run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml + run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }}--cloud.xml timeout-minutes: 10 env: TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} @@ -97,7 +97,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }} + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }} path: junit-xml retention-days: 14 From df4ac4ca33979052980fb1009f5230c700f42fa7 Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Wed, 25 Jun 2025 10:51:56 -0700 Subject: [PATCH 04/10] Remove locked from matrix --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c43808fb8..9f38324cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,6 @@ jobs: matrix: python: ["3.9", "3.13"] os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] - dependencies: ["locked"] include: # On 3.9 there is a problem with import errors caused by pytests' loader that surface due # to a bug in CPython (https://github.com/python/cpython/issues/91351), so we avoid using From 35d4a70662c15e5f16d401b98e974a0044393af2 Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Thu, 26 Jun 2025 11:10:57 -0700 Subject: [PATCH 05/10] Fixing problem with updated openai dependency --- tests/contrib/test_openai.py | 3 ++- uv.lock | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/contrib/test_openai.py b/tests/contrib/test_openai.py index ba49bd692..0515aeb7d 100644 --- a/tests/contrib/test_openai.py +++ b/tests/contrib/test_openai.py @@ -57,6 +57,7 @@ ResponseOutputMessage, ResponseOutputText, ) + from openai.types.responses.response_function_web_search import ActionSearch from openai.types.responses.response_prompt_param import ResponsePromptParam from tests.contrib.research_agents.research_manager import ResearchManager @@ -405,7 +406,7 @@ class TestResearchModel(TestModel): ModelResponse( output=[ ResponseFunctionWebSearch( - id="", status="completed", type="web_search_call" + id="", status="completed", type="web_search_call", action=ActionSearch(query="", type="search", domains=None) ), ResponseOutputMessage( id="", diff --git a/uv.lock b/uv.lock index 9d80402aa..88bba27a7 100644 --- a/uv.lock +++ b/uv.lock @@ -1004,7 +1004,7 @@ wheels = [ [[package]] name = "openai" -version = "1.88.0" +version = "1.92.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -1016,9 +1016,9 @@ dependencies = [ { name = "tqdm" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5a/ea/bbeef604d1fe0f7e9111745bb8a81362973a95713b28855beb9a9832ab12/openai-1.88.0.tar.gz", hash = "sha256:122d35e42998255cf1fc84560f6ee49a844e65c054cd05d3e42fda506b832bb1", size = 470963, upload-time = "2025-06-17T05:04:45.856Z" } +sdist = { url = "https://files.pythonhosted.org/packages/37/3f/75ad8dfe1ee4e6daacebc5a8145878c00b22c4b89e3446228d3ffccbf726/openai-1.92.0.tar.gz", hash = "sha256:acaf4ee5fca8611a09035e37ceb69a352b4a84e25b103f0fc1ccc696bf9a16f0", size = 485264, upload-time = "2025-06-26T16:57:18.996Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/03/ef68d77a38dd383cbed7fc898857d394d5a8b0520a35f054e7fe05dc3ac1/openai-1.88.0-py3-none-any.whl", hash = "sha256:7edd7826b3b83f5846562a6f310f040c79576278bf8e3687b30ba05bb5dff978", size = 734293, upload-time = "2025-06-17T05:04:43.858Z" }, + { url = "https://files.pythonhosted.org/packages/68/66/8f85019b7943e4976d931fdb0e2b973090b4dac999c3e90844d2336f1184/openai-1.92.0-py3-none-any.whl", hash = "sha256:99210715bad1a4de5a387993aca7e4e8e5a742f1e185eefe2f805001cc2c21f3", size = 753397, upload-time = "2025-06-26T16:57:17.038Z" }, ] [[package]] From 74c160637123aa859472e6f8577d24b46165deef Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Thu, 26 Jun 2025 11:13:17 -0700 Subject: [PATCH 06/10] Lint --- tests/contrib/test_openai.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/contrib/test_openai.py b/tests/contrib/test_openai.py index 0515aeb7d..aa03df749 100644 --- a/tests/contrib/test_openai.py +++ b/tests/contrib/test_openai.py @@ -406,7 +406,10 @@ class TestResearchModel(TestModel): ModelResponse( output=[ ResponseFunctionWebSearch( - id="", status="completed", type="web_search_call", action=ActionSearch(query="", type="search", domains=None) + id="", + status="completed", + type="web_search_call", + action=ActionSearch(query="", type="search", domains=None), ), ResponseOutputMessage( id="", From 3c4b48025d95bf83fcdcd9d3555d6261ad54ffaa Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Fri, 27 Jun 2025 11:06:19 -0700 Subject: [PATCH 07/10] Move latest deps test to separate job --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f38324cd..e8a56f80d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,6 @@ jobs: pythonOverride: "3.13.4" - os: ubuntu-latest python: "3.13" - dependencies: "latest" runs-on: ${{ matrix.runsOn || matrix.os }} steps: - uses: actions/checkout@v4 @@ -70,8 +69,6 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: astral-sh/setup-uv@v5 - run: uv tool install poethepoet - - run: uv lock --upgrade - if: ${{ matrix.dependencies == 'latest'}} - run: uv sync --all-extras - run: poe bridge-lint if: ${{ matrix.clippyLinter }} @@ -137,6 +134,45 @@ jobs: run: | npx doctoc README.md [[ -z $(git status --porcelain README.md) ]] || (git diff README.md; echo "README changed"; exit 1) + test-latest-deps: + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + workspaces: temporalio/bridge -> target + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - uses: arduino/setup-protoc@v3 + with: + # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed + version: "23.x" + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: astral-sh/setup-uv@v5 + - run: uv tool install poethepoet + - run: uv lock --upgrade + - run: uv sync --all-extras + - run: poe lint + - run: poe build-develop + - run: mkdir junit-xml + - run: poe test -s --junit-xml=junit-xml/latest-deps.xml + timeout-minutes: 10 + # Time skipping doesn't yet support ARM + - run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/latest-deps--time-skipping.xml + timeout-minutes: 10 + # Check cloud if proper target and not on fork + - name: "Upload junit-xml artifacts" + uses: actions/upload-artifact@v4 + if: always() + with: + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--latest-deps--time-skipping + path: junit-xml + retention-days: 14 # Runs the sdk features repo tests with this repo's current SDK code features-tests: From a386ef2266dc614aa40397b20dd3195ed684bebc Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Fri, 27 Jun 2025 11:15:05 -0700 Subject: [PATCH 08/10] Fix openai test break --- tests/contrib/test_openai.py | 10 +++++----- uv.lock | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/contrib/test_openai.py b/tests/contrib/test_openai.py index 721a8fece..107050be0 100644 --- a/tests/contrib/test_openai.py +++ b/tests/contrib/test_openai.py @@ -3,7 +3,7 @@ import uuid from dataclasses import dataclass from datetime import timedelta -from typing import Any, Optional, Union +from typing import Any, Optional, Union, no_type_check import pytest @@ -410,6 +410,7 @@ async def get_response( ) +@no_type_check class TestResearchModel(TestModel): responses = [ ModelResponse( @@ -421,7 +422,7 @@ class TestResearchModel(TestModel): text='{"searches":[{"query":"best Caribbean surfing spots April","reason":"Identify locations with optimal surfing conditions in the Caribbean during April."},{"query":"top Caribbean islands for hiking April","reason":"Find Caribbean islands with excellent hiking opportunities that are ideal in April."},{"query":"Caribbean water sports destinations April","reason":"Locate Caribbean destinations offering a variety of water sports activities in April."},{"query":"surfing conditions Caribbean April","reason":"Understand the surfing conditions and which islands are suitable for surfing in April."},{"query":"Caribbean adventure travel hiking surfing","reason":"Explore adventure travel options that combine hiking and surfing in the Caribbean."},{"query":"best beaches for surfing Caribbean April","reason":"Identify which Caribbean beaches are renowned for surfing in April."},{"query":"Caribbean islands with national parks hiking","reason":"Find islands with national parks or reserves that offer hiking trails."},{"query":"Caribbean weather April surfing conditions","reason":"Research the weather conditions in April affecting surfing in the Caribbean."},{"query":"Caribbean water sports rentals April","reason":"Look for places where water sports equipment can be rented in the Caribbean during April."},{"query":"Caribbean multi-activity vacation packages","reason":"Look for vacation packages that offer a combination of surfing, hiking, and water sports."}]}', annotations=[], type="output_text", - ) + ) # type: ignore ], role="assistant", status="completed", @@ -439,9 +440,8 @@ class TestResearchModel(TestModel): ResponseFunctionWebSearch( id="", status="completed", - type="web_search_call", - action=ActionSearch(query="", type="search", domains=None), - ), + action=ActionSearch(query="", type="search"), # type: ignore + ), # type: ignore ResponseOutputMessage( id="", content=[ diff --git a/uv.lock b/uv.lock index 88bba27a7..f753830c7 100644 --- a/uv.lock +++ b/uv.lock @@ -1004,7 +1004,7 @@ wheels = [ [[package]] name = "openai" -version = "1.92.0" +version = "1.92.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -1016,9 +1016,9 @@ dependencies = [ { name = "tqdm" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/37/3f/75ad8dfe1ee4e6daacebc5a8145878c00b22c4b89e3446228d3ffccbf726/openai-1.92.0.tar.gz", hash = "sha256:acaf4ee5fca8611a09035e37ceb69a352b4a84e25b103f0fc1ccc696bf9a16f0", size = 485264, upload-time = "2025-06-26T16:57:18.996Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8b/bd/6c123e53d6727dc39086346df1161c8b6bb50e4cc0f2e9075cae909049b6/openai-1.92.3.tar.gz", hash = "sha256:6b707bc926a9fffab262dbd1eb4be29c36d627b9012633a66ccdbe2d615a9532", size = 485647, upload-time = "2025-06-27T17:06:55.96Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/68/66/8f85019b7943e4976d931fdb0e2b973090b4dac999c3e90844d2336f1184/openai-1.92.0-py3-none-any.whl", hash = "sha256:99210715bad1a4de5a387993aca7e4e8e5a742f1e185eefe2f805001cc2c21f3", size = 753397, upload-time = "2025-06-26T16:57:17.038Z" }, + { url = "https://files.pythonhosted.org/packages/ea/60/4956baa677a569a247336c7edff4b3b6aab7a54119e2342d391d1d370446/openai-1.92.3-py3-none-any.whl", hash = "sha256:979f00c097d023a28f22c63373a646a675e4b9e1fad586e2424bf7274a2689f2", size = 753350, upload-time = "2025-06-27T17:06:53.547Z" }, ] [[package]] From 8231a78e666434f23a9092faa22d3bd22140c11a Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Fri, 27 Jun 2025 11:21:33 -0700 Subject: [PATCH 09/10] Pydantic validation fails anyway, so remove type ingore --- tests/contrib/test_openai.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/contrib/test_openai.py b/tests/contrib/test_openai.py index 107050be0..033557d6d 100644 --- a/tests/contrib/test_openai.py +++ b/tests/contrib/test_openai.py @@ -422,7 +422,7 @@ class TestResearchModel(TestModel): text='{"searches":[{"query":"best Caribbean surfing spots April","reason":"Identify locations with optimal surfing conditions in the Caribbean during April."},{"query":"top Caribbean islands for hiking April","reason":"Find Caribbean islands with excellent hiking opportunities that are ideal in April."},{"query":"Caribbean water sports destinations April","reason":"Locate Caribbean destinations offering a variety of water sports activities in April."},{"query":"surfing conditions Caribbean April","reason":"Understand the surfing conditions and which islands are suitable for surfing in April."},{"query":"Caribbean adventure travel hiking surfing","reason":"Explore adventure travel options that combine hiking and surfing in the Caribbean."},{"query":"best beaches for surfing Caribbean April","reason":"Identify which Caribbean beaches are renowned for surfing in April."},{"query":"Caribbean islands with national parks hiking","reason":"Find islands with national parks or reserves that offer hiking trails."},{"query":"Caribbean weather April surfing conditions","reason":"Research the weather conditions in April affecting surfing in the Caribbean."},{"query":"Caribbean water sports rentals April","reason":"Look for places where water sports equipment can be rented in the Caribbean during April."},{"query":"Caribbean multi-activity vacation packages","reason":"Look for vacation packages that offer a combination of surfing, hiking, and water sports."}]}', annotations=[], type="output_text", - ) # type: ignore + ) ], role="assistant", status="completed", @@ -440,8 +440,9 @@ class TestResearchModel(TestModel): ResponseFunctionWebSearch( id="", status="completed", - action=ActionSearch(query="", type="search"), # type: ignore - ), # type: ignore + type="web_search_call", + action=ActionSearch(query="", type="search"), + ), ResponseOutputMessage( id="", content=[ From e0edf8d40acb69b586c25c9e236cb97de2c4b828 Mon Sep 17 00:00:00 2001 From: Tim Conley Date: Fri, 27 Jun 2025 12:04:01 -0700 Subject: [PATCH 10/10] CI cleanup --- .github/workflows/ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74fafd320..809fa426e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,6 @@ jobs: - os: windows-latest python: "3.13" pythonOverride: "3.13.4" - - os: ubuntu-latest - python: "3.13" runs-on: ${{ matrix.runsOn || matrix.os }} steps: - uses: actions/checkout@v4 @@ -75,17 +73,17 @@ jobs: - run: poe lint - run: poe build-develop - run: mkdir junit-xml - - run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }}.xml + - run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml timeout-minutes: 10 # 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 }}--${{ matrix.dependencies }}--time-skipping.xml + run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml timeout-minutes: 10 env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Check cloud if proper target and not on fork - if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} - run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }}--cloud.xml + run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml timeout-minutes: 10 env: TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} @@ -95,7 +93,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}--${{ matrix.dependencies }} + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }} path: junit-xml retention-days: 14 @@ -164,10 +162,6 @@ jobs: - run: mkdir junit-xml - run: poe test -s --junit-xml=junit-xml/latest-deps.xml timeout-minutes: 10 - # Time skipping doesn't yet support ARM - - run: poe test -s --workflow-environment time-skipping --junit-xml=junit-xml/latest-deps--time-skipping.xml - timeout-minutes: 10 - # Check cloud if proper target and not on fork - name: "Upload junit-xml artifacts" uses: actions/upload-artifact@v4 if: always()