From 0dff4f72e0505e6204f466669914fbd45eb4b11d Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 2 Sep 2025 19:17:56 -0400 Subject: [PATCH 1/3] Fix build binaries --- .github/workflows/build-binaries.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 3c7834b5b..b7e927573 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -4,6 +4,7 @@ on: branches: - main - "releases/*" + - fix-build-binaries jobs: # Compile the binaries and upload artifacts @@ -65,7 +66,7 @@ jobs: if [ "$RUNNER_OS" = "Windows" ]; then bindir=Scripts fi - ./.venv/$bindir/pip install 'protobuf>=3.20,<6' 'types-protobuf>=3.20,<6' 'typing-extensions>=4.2.0,<5' pytest pytest_asyncio grpcio 'nexus-rpc>=1.1.0' pydantic opentelemetry-api opentelemetry-sdk python-dateutil openai-agents + ./.venv/$bindir/pip install 'protobuf>=3.20,<6' 'types-protobuf>=3.20,<6' 'typing-extensions>=4.2.0,<5' pytest pytest_asyncio grpcio 'nexus-rpc>=1.1.0' pydantic opentelemetry-api opentelemetry-sdk python-dateutil 'openai-agents>=0.2.3,<=0.2.9' ./.venv/$bindir/pip install --no-index --find-links=../dist temporalio ./.venv/$bindir/python -m pytest -s -k test_workflow_hello From 0053d06a8ade2ed8468920ace02bd599b801e746 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 2 Sep 2025 19:18:25 -0400 Subject: [PATCH 2/3] Disable main CI --- .github/workflows/ci.yml | 183 --------------------------------------- 1 file changed, 183 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index a9637f8ad..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,183 +0,0 @@ -name: Continuous Integration -on: - pull_request: - push: - branches: - - main - - "releases/*" - -env: - COLUMNS: 120 - -jobs: - # Build and test the project - build-lint-test: - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - python: ["3.9", "3.13"] - os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] - 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 - # the assert rewriter. - - python: "3.9" - pytestExtraArgs: "--assert=plain" - - os: ubuntu-latest - python: "3.13" - docsTarget: true - cloudTestTarget: true - openaiTestTarget: true - clippyLinter: true - - os: ubuntu-latest - python: "3.9" - protoCheckTarget: true - - os: ubuntu-arm - runsOn: ubuntu-24.04-arm64-2-core - - os: macos-intel - runsOn: macos-13 - # On 3.13.3 there is some issue with macOS intel where it hangs after pytest with some - # test that may have a worker that cannot properly shutdown, but it does not occur on - # other versions, platforms, etc. See https://github.com/temporalio/sdk-python/issues/834. - - os: macos-intel - python: "3.13" - pythonOverride: "3.13.2" - - os: macos-arm - runsOn: macos-latest - # On 3.13.5, python3.lib is missing for the linker - - os: windows-latest - python: "3.13" - pythonOverride: "3.13.4" - runs-on: ${{ matrix.runsOn || matrix.os }} - 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: ${{ matrix.pythonOverride || matrix.python }} - - 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 sync --all-extras - - run: poe bridge-lint - if: ${{ matrix.clippyLinter }} - - 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 - timeout-minutes: 15 - # 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 - 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 - timeout-minutes: 10 - env: - TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} - TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00 - TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6 - - if: ${{ matrix.openaiTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} - run: poe test tests/contrib/openai_agents/test_openai.py ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--openai.xml - timeout-minutes: 10 - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - - name: "Upload junit-xml artifacts" - uses: actions/upload-artifact@v4 - if: always() - with: - name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }} - path: junit-xml - retention-days: 14 - - # Confirm protos are already generated properly with older protobuf - # library and run test with that older version. We must downgrade protobuf - # so we can generate 3.x and 4.x compatible API. We have to use older - # Python to run this check because the grpcio-tools version we use - # is <= 3.10. - - name: Check generated protos and test protobuf 3.x - if: ${{ matrix.protoCheckTarget }} - env: - TEMPORAL_TEST_PROTO3: 1 - run: | - uv add --python 3.9 "protobuf<4" - uv sync --all-extras - poe build-develop - poe gen-protos - poe format - [[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1) - poe test -s - timeout-minutes: 10 - - # Do docs stuff (only on one host) - - name: Build API docs - if: ${{ matrix.docsTarget }} - run: poe gen-docs - - name: Deploy prod API docs - if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }} - env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --prod --yes - - # Confirm README ToC is generated properly - - uses: actions/setup-node@v4 - - name: Check generated README ToC - if: ${{ matrix.docsTarget }} - 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 - - 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: - uses: temporalio/features/.github/workflows/python.yaml@main - with: - python-repo-path: ${{github.event.pull_request.head.repo.full_name}} - version: ${{github.event.pull_request.head.ref}} - version-is-repo-ref: true From 7a201af08871e50957cba064e267c019c61c1731 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 2 Sep 2025 19:29:56 -0400 Subject: [PATCH 3/3] Revert "Disable main CI" This reverts commit 0053d06a8ade2ed8468920ace02bd599b801e746. --- .github/workflows/ci.yml | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..a9637f8ad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,183 @@ +name: Continuous Integration +on: + pull_request: + push: + branches: + - main + - "releases/*" + +env: + COLUMNS: 120 + +jobs: + # Build and test the project + build-lint-test: + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + python: ["3.9", "3.13"] + os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] + 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 + # the assert rewriter. + - python: "3.9" + pytestExtraArgs: "--assert=plain" + - os: ubuntu-latest + python: "3.13" + docsTarget: true + cloudTestTarget: true + openaiTestTarget: true + clippyLinter: true + - os: ubuntu-latest + python: "3.9" + protoCheckTarget: true + - os: ubuntu-arm + runsOn: ubuntu-24.04-arm64-2-core + - os: macos-intel + runsOn: macos-13 + # On 3.13.3 there is some issue with macOS intel where it hangs after pytest with some + # test that may have a worker that cannot properly shutdown, but it does not occur on + # other versions, platforms, etc. See https://github.com/temporalio/sdk-python/issues/834. + - os: macos-intel + python: "3.13" + pythonOverride: "3.13.2" + - os: macos-arm + runsOn: macos-latest + # On 3.13.5, python3.lib is missing for the linker + - os: windows-latest + python: "3.13" + pythonOverride: "3.13.4" + runs-on: ${{ matrix.runsOn || matrix.os }} + 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: ${{ matrix.pythonOverride || matrix.python }} + - 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 sync --all-extras + - run: poe bridge-lint + if: ${{ matrix.clippyLinter }} + - 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 + timeout-minutes: 15 + # 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 + 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 + timeout-minutes: 10 + env: + TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} + TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00 + TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6 + - if: ${{ matrix.openaiTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} + run: poe test tests/contrib/openai_agents/test_openai.py ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--openai.xml + timeout-minutes: 10 + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + - name: "Upload junit-xml artifacts" + uses: actions/upload-artifact@v4 + if: always() + with: + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }} + path: junit-xml + retention-days: 14 + + # Confirm protos are already generated properly with older protobuf + # library and run test with that older version. We must downgrade protobuf + # so we can generate 3.x and 4.x compatible API. We have to use older + # Python to run this check because the grpcio-tools version we use + # is <= 3.10. + - name: Check generated protos and test protobuf 3.x + if: ${{ matrix.protoCheckTarget }} + env: + TEMPORAL_TEST_PROTO3: 1 + run: | + uv add --python 3.9 "protobuf<4" + uv sync --all-extras + poe build-develop + poe gen-protos + poe format + [[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1) + poe test -s + timeout-minutes: 10 + + # Do docs stuff (only on one host) + - name: Build API docs + if: ${{ matrix.docsTarget }} + run: poe gen-docs + - name: Deploy prod API docs + if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }} + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --prod --yes + + # Confirm README ToC is generated properly + - uses: actions/setup-node@v4 + - name: Check generated README ToC + if: ${{ matrix.docsTarget }} + 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 + - 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: + uses: temporalio/features/.github/workflows/python.yaml@main + with: + python-repo-path: ${{github.event.pull_request.head.repo.full_name}} + version: ${{github.event.pull_request.head.ref}} + version-is-repo-ref: true