Skip to content

Commit 9ad998f

Browse files
committed
Restrict CI and add debugging output
1 parent 2affa25 commit 9ad998f

File tree

4 files changed

+8
-50
lines changed

4 files changed

+8
-50
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ jobs:
8888
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
8989
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00
9090
TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6
91-
- if: ${{ matrix.openaiTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
92-
run: poe test tests/contrib/openai_agents/test_openai.py ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--openai.xml
93-
timeout-minutes: 10
94-
env:
95-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
9691
- name: "Upload junit-xml artifacts"
9792
uses: actions/upload-artifact@v4
9893
if: always()
@@ -101,43 +96,7 @@ jobs:
10196
path: junit-xml
10297
retention-days: 14
10398

104-
# Confirm protos are already generated properly with older protobuf
105-
# library and run test with that older version. We must downgrade protobuf
106-
# so we can generate 3.x and 4.x compatible API. We have to use older
107-
# Python to run this check because the grpcio-tools version we use
108-
# is <= 3.10.
109-
- name: Check generated protos and test protobuf 3.x
110-
if: ${{ matrix.protoCheckTarget }}
111-
env:
112-
TEMPORAL_TEST_PROTO3: 1
113-
run: |
114-
uv add --python 3.9 "protobuf<4"
115-
uv sync --all-extras
116-
poe build-develop
117-
poe gen-protos
118-
poe format
119-
[[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1)
120-
poe test -s
121-
timeout-minutes: 10
12299

123-
# Do docs stuff (only on one host)
124-
- name: Build API docs
125-
if: ${{ matrix.docsTarget }}
126-
run: poe gen-docs
127-
- name: Deploy prod API docs
128-
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }}
129-
env:
130-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
131-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
132-
run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --prod --yes
133-
134-
# Confirm README ToC is generated properly
135-
- uses: actions/setup-node@v4
136-
- name: Check generated README ToC
137-
if: ${{ matrix.docsTarget }}
138-
run: |
139-
npx doctoc README.md
140-
[[ -z $(git status --porcelain README.md) ]] || (git diff README.md; echo "README changed"; exit 1)
141100
test-latest-deps:
142101
timeout-minutes: 30
143102
runs-on: ubuntu-latest
@@ -173,11 +132,3 @@ jobs:
173132
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--latest-deps--time-skipping
174133
path: junit-xml
175134
retention-days: 14
176-
177-
# Runs the sdk features repo tests with this repo's current SDK code
178-
features-tests:
179-
uses: temporalio/features/.github/workflows/python.yaml@main
180-
with:
181-
python-repo-path: ${{github.event.pull_request.head.repo.full_name}}
182-
version: ${{github.event.pull_request.head.ref}}
183-
version-is-repo-ref: true

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ lint-types = [
8181
{ cmd = "uv run mypy --namespace-packages --check-untyped-defs ."},
8282
]
8383
run-bench = "uv run python scripts/run_bench.py"
84-
test = "uv run pytest"
84+
test = "uv run pytest -s 'tests/nexus/test_workflow_caller_cancellation_types.py::test_cancellation_type[TRY_CANCEL]' 'tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py::test_cancellation_type[TRY_CANCEL]'"
8585

8686

8787
[tool.pytest.ini_options]

tests/nexus/test_workflow_caller_cancellation_types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from temporalio.common import WorkflowIDConflictPolicy
2222
from temporalio.testing import WorkflowEnvironment
2323
from temporalio.worker import Worker
24+
from tests.helpers import print_interleaved_histories
2425
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
2526

2627

@@ -329,6 +330,9 @@ async def check_behavior_for_try_cancel(
329330
handler_status = (await handler_wf.describe()).status
330331
assert handler_status == WorkflowExecutionStatus.CANCELED
331332
caller_op_future_resolved = test_context.caller_op_future_resolved.result()
333+
334+
await print_interleaved_histories([caller_wf, handler_wf])
335+
332336
await assert_event_subsequence(
333337
[
334338
(caller_wf, EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED),

tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from temporalio.common import WorkflowIDConflictPolicy
2424
from temporalio.testing import WorkflowEnvironment
2525
from temporalio.worker import Worker
26+
from tests.helpers import print_interleaved_histories
2627
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
2728
from tests.nexus.test_workflow_caller_cancellation_types import (
2829
assert_event_subsequence,
@@ -301,6 +302,8 @@ async def check_behavior_for_try_cancel(
301302
assert result.error_cause_type == "CancelledError"
302303

303304
caller_op_future_resolved = test_context.caller_op_future_resolved.result()
305+
await print_interleaved_histories([caller_wf, handler_wf])
306+
304307
await assert_event_subsequence(
305308
[
306309
(caller_wf, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED),

0 commit comments

Comments
 (0)